3 # simplified dhclient-script for NeXTSTEP/OPENSTEP
5 # removed a lot of the cruft from the netbsd version since NeXTSTEP doesn't
6 # support aliases and lots of things were breaking for no good reason
8 # 14 Sep 1997, David W. Young
10 if [ x
$reason = xPREINIT
]; then
11 ifconfig
$interface inet
0.0.0.0 netmask
0.0.0.0 up
>/dev
/null
2>&1
14 if [ x
$reason = xBOUND
] ||
[ x
$reason = xRENEW
] || \
15 [ x
$reason = xREBIND
] ||
[ x
$reason = xREBOOT
]; then
16 current_hostname
=`hostname`
17 if [ x
$current_hostname = x
] || \
18 [ x
$current_hostname = x
$old_host_name ]; then
19 if [ x
$current_hostname = x
] || \
20 [ x
$new_host_name != x
$old_host_name ]; then
21 hostname
$new_host_name
25 if [ x
$old_ip_address != x
] && [ x
$old_ip_address != x
$new_ip_address ]
27 ifconfig
$interface $new_ip_address netmask
$new_subnet_mask \
29 route add
$new_ip_address 127.1 0 >/dev
/null
2>&1
30 for router
in $new_routers ; do
31 route add default
$router 1 >/dev
/null
2>&1
34 if [ "x$new_domain_name" != x
] && [ x
"$new_domain_name_servers" != x
]; then
35 echo search
$new_domain_name >/etc
/resolv.conf
36 for nameserver
in $new_domain_name_servers; do
37 echo nameserver
$nameserver >>/etc
/resolv.conf
42 if [ x
$reason = xEXPIRE
] ||
[ x
$reason = xFAIL
] ||
[ x
$reason = xRELEASE
] \
43 ||
[ x
$reason = xSTOP
]; then
44 if [ x
$old_ip_address != x
]; then
45 route delete
$old_ip_address 127.1 >/dev
/null
2>&1
46 for $router in $old_routers ; do
47 route delete default
$router >/dev
/null
2>&1