/[baselayout]/branches/rc-scripts-1_6/net-scripts/net.modules.d/helpers.d/dhclient-udhcpc-wrapper
Gentoo

Contents of /branches/rc-scripts-1_6/net-scripts/net.modules.d/helpers.d/dhclient-udhcpc-wrapper

Parent Directory Parent Directory | Revision Log Revision Log


Revision 757 - (show annotations) (download)
Mon Dec 6 15:46:18 2004 UTC (13 years, 10 months ago) by agriffis
File size: 1243 byte(s)
Merge updates from HEAD

1 #!/bin/sh
2 # dhclient udhcpc wrapper for net-scripts
3 # Version 1.0.0
4 # Copyright (c) 2004 Gentoo Foundation
5 # Distributed under the terms of the GNU General Public License V2
6 # Contributed by Roy Marples (uberlord@gentoo.org)
7
8 # Instead of writing new functions for dhclient, we simply map their variables
9 # over to udhcpc style ones and call those scripts!
10
11 iface_type=${1}
12
13 echo ${reason}
14 case "${reason}" in
15 BOUND|REBOOT|REBIND) action=bound ;;
16 RENEW) action=renew ;;
17 RELEASE|PREINIT|FAIL|EXPIRE|TIMEOUT) action=deconfig ;;
18 MEDIUM) exit 0 ;;
19 esac
20
21 if [[ -z ${action} ]]; then
22 echo "dhclient sent an unknown action ${reason}!" >&2
23 exit 1
24 fi
25
26 export ip=${new_ip_address}
27 export subnet=${new_subnet_mask}
28 export broadcast=${new_broadcast_address}
29 routers=( ${new_routers} )
30 export router=${routers[0]}
31 export new_routers=${router}
32
33 export hostname=${new_hostname}
34
35 export domain=${new_domain_name}
36 export dns=${new_domain_name_servers}
37 export new_domain_name=${domain}
38
39 export ntpsrv=${new_domain_name_servers}
40
41 export nisdomain=${new_nis_domain}
42 export nissrv=${new_nis_servers}
43
44 export module=dhclient
45
46 # Execute the dhclient script and exit with it's code
47 /lib/rcscripts/net.modules.d/helpers.d/udhcpc-${iface_type} ${action}
48 exit $?

Properties

Name Value
svn:eol-style native
svn:executable *
svn:keywords Author Date Id Revision

  ViewVC Help
Powered by ViewVC 1.1.20