summaryrefslogtreecommitdiff
path: root/client/scripts
diff options
context:
space:
mode:
Diffstat (limited to 'client/scripts')
-rwxr-xr-xclient/scripts/bsdos13
-rwxr-xr-xclient/scripts/freebsd13
-rwxr-xr-xclient/scripts/linux13
-rwxr-xr-xclient/scripts/netbsd13
-rw-r--r--client/scripts/nextstep13
-rw-r--r--client/scripts/openbsd13
-rwxr-xr-xclient/scripts/solaris13
7 files changed, 56 insertions, 35 deletions
diff --git a/client/scripts/bsdos b/client/scripts/bsdos
index 13be7008..d076d92d 100755
--- a/client/scripts/bsdos
+++ b/client/scripts/bsdos
@@ -1,10 +1,12 @@
#!/bin/sh
make_resolv_conf() {
- echo search $new_domain_name >/etc/resolv.conf
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
- done
+ if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
+ echo search $new_domain_name >/etc/resolv.conf
+ for nameserver in $new_domain_name_servers; do
+ echo nameserver $nameserver >>/etc/resolv.conf
+ done
+ fi
}
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
@@ -127,7 +129,8 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
exit_with_hooks 0
fi
-if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ]; then
+if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
+ || [ x$reason = xSTOP ]; then
if [ x$alias_ip_address != x ]; then
ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
diff --git a/client/scripts/freebsd b/client/scripts/freebsd
index 4f2d971f..652d0d06 100755
--- a/client/scripts/freebsd
+++ b/client/scripts/freebsd
@@ -7,10 +7,12 @@ else
fi
make_resolv_conf() {
- echo search $new_domain_name >/etc/resolv.conf
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
- done
+ if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
+ echo search $new_domain_name >/etc/resolv.conf
+ for nameserver in $new_domain_name_servers; do
+ echo nameserver $nameserver >>/etc/resolv.conf
+ done
+ fi
}
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
@@ -140,7 +142,8 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
exit_with_hooks 0
fi
-if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ]; then
+if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
+ || [ x$reason = xSTOP ]; then
if [ x$alias_ip_address != x ]; then
ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
diff --git a/client/scripts/linux b/client/scripts/linux
index 9f02f23f..71d00ab3 100755
--- a/client/scripts/linux
+++ b/client/scripts/linux
@@ -23,10 +23,12 @@
# of the $1 in its args.
function make_resolv_conf() {
- echo search $new_domain_name >/etc/resolv.conf
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
- done
+ if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
+ echo search $new_domain_name >/etc/resolv.conf
+ for nameserver in $new_domain_name_servers; do
+ echo nameserver $nameserver >>/etc/resolv.conf
+ done
+ fi
}
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
@@ -147,7 +149,8 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
exit_with_hooks 0
fi
-if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ]; then
+if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
+ || [ x$reason = xSTOP ]; then
if [ x$alias_ip_address != x ]; then
# Turn off alias interface.
ifconfig $interface:0- inet 0
diff --git a/client/scripts/netbsd b/client/scripts/netbsd
index f61d0e78..d226cdff 100755
--- a/client/scripts/netbsd
+++ b/client/scripts/netbsd
@@ -1,10 +1,12 @@
#!/bin/sh
make_resolv_conf() {
- echo search $new_domain_name >/etc/resolv.conf
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
- done
+ if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
+ echo search $new_domain_name >/etc/resolv.conf
+ for nameserver in $new_domain_name_servers; do
+ echo nameserver $nameserver >>/etc/resolv.conf
+ done
+ fi
}
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
@@ -127,7 +129,8 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
exit_with_hooks 0
fi
-if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ]; then
+if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
+ || [ x$reason = xSTOP ]; then
if [ x$alias_ip_address != x ]; then
ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
diff --git a/client/scripts/nextstep b/client/scripts/nextstep
index 1c8c2a26..7600fb14 100644
--- a/client/scripts/nextstep
+++ b/client/scripts/nextstep
@@ -31,13 +31,16 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
route add default $router 1 >/dev/null 2>&1
done
fi
- echo search $new_domain_name >/etc/resolv.conf
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
- done
+ if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
+ echo search $new_domain_name >/etc/resolv.conf
+ for nameserver in $new_domain_name_servers; do
+ echo nameserver $nameserver >>/etc/resolv.conf
+ done
+ fi
exit 0
fi
-if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ]; then
+if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
+ || [ x$reason = xSTOP ]; then
if [ x$old_ip_address != x ]; then
route delete $old_ip_address 127.1 >/dev/null 2>&1
for $router in $old_routers ; do
diff --git a/client/scripts/openbsd b/client/scripts/openbsd
index 13be7008..d076d92d 100644
--- a/client/scripts/openbsd
+++ b/client/scripts/openbsd
@@ -1,10 +1,12 @@
#!/bin/sh
make_resolv_conf() {
- echo search $new_domain_name >/etc/resolv.conf
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
- done
+ if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
+ echo search $new_domain_name >/etc/resolv.conf
+ for nameserver in $new_domain_name_servers; do
+ echo nameserver $nameserver >>/etc/resolv.conf
+ done
+ fi
}
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
@@ -127,7 +129,8 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
exit_with_hooks 0
fi
-if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ]; then
+if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
+ || [ x$reason = xSTOP ]; then
if [ x$alias_ip_address != x ]; then
ifconfig $interface inet -alias $alias_ip_address > /dev/null 2>&1
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
diff --git a/client/scripts/solaris b/client/scripts/solaris
index 21e83fa0..e6187c71 100755
--- a/client/scripts/solaris
+++ b/client/scripts/solaris
@@ -1,10 +1,12 @@
#!/bin/sh
make_resolv_conf() {
- echo search $new_domain_name >/etc/resolv.conf
- for nameserver in $new_domain_name_servers; do
- echo nameserver $nameserver >>/etc/resolv.conf
- done
+ if [ "x$new_domain_name" != x ] && [ x"$new_domain_name_servers" != x ]; then
+ echo search $new_domain_name >/etc/resolv.conf
+ for nameserver in $new_domain_name_servers; do
+ echo nameserver $nameserver >>/etc/resolv.conf
+ done
+ fi
}
# Must be used on exit. Invokes the local dhcp client exit hooks, if any.
@@ -120,7 +122,8 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
exit_with_hooks 0
fi
-if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ]; then
+if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ] || [ x$reason = xRELEASE ] \
+ || [ x$reason = xSTOP ]; then
if [ x$alias_ip_address != x ]; then
$ifconfig ${interface}:1 0 down > /dev/null 2>&1
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1