/[baselayout]/trunk/net-scripts/net.modules.d/helpers.d/dhclient-udhcpc-wrapper
Gentoo

Contents of /trunk/net-scripts/net.modules.d/helpers.d/dhclient-udhcpc-wrapper

Parent Directory Parent Directory | Revision Log Revision Log


Revision 870 - (show annotations) (download)
Tue Jan 25 10:44:05 2005 UTC (14 years, 4 months ago) by uberlord
File size: 1185 byte(s)
Updated copyright headers

1 #!/bin/sh
2 # Copyright (c) 2004-2005 Gentoo Foundation
3 # Distributed under the terms of the GNU General Public License v2
4 # $Header$
5
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 case "${reason}" in
14 BOUND|REBOOT|REBIND) action=bound ;;
15 RENEW) action=renew ;;
16 RELEASE|PREINIT|FAIL|EXPIRE|TIMEOUT) action=deconfig ;;
17 MEDIUM) exit 0 ;;
18 esac
19
20 if [[ -z ${action} ]]; then
21 echo "dhclient sent an unknown action ${reason}!" >&2
22 exit 1
23 fi
24
25 export ip=${new_ip_address}
26 export subnet=${new_subnet_mask}
27 export broadcast=${new_broadcast_address}
28 routers=( ${new_routers} )
29 export router=${routers[0]}
30 export new_routers=${router}
31
32 export hostname=${new_hostname}
33
34 export domain=${new_domain_name}
35 export dns=${new_domain_name_servers}
36 export new_domain_name=${domain}
37
38 export ntpsrv=${new_domain_name_servers}
39
40 export nisdomain=${new_nis_domain}
41 export nissrv=${new_nis_servers}
42
43 export module=dhclient
44
45 # Execute the dhclient script and exit with it's code
46 /lib/rcscripts/net.modules.d/helpers.d/udhcpc-${iface_type} ${action}
47 exit $?

Properties

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

  ViewVC Help
Powered by ViewVC 1.1.20