summaryrefslogtreecommitdiff
path: root/client
diff options
context:
space:
mode:
authorTed Lemon <source@isc.org>2001-03-15 23:16:52 +0000
committerTed Lemon <source@isc.org>2001-03-15 23:16:52 +0000
commit46b626384f8b26fc125175658d09d68b939f9628 (patch)
treec2902b6cb3fdb4fa0d476fa471a919b5d6bc5b07 /client
parentdd215f30ff9c25144080c637d35cb45871c13270 (diff)
downloadisc-dhcp-46b626384f8b26fc125175658d09d68b939f9628.tar.gz
Use eval for ifconfig so that medium can include quoted strings (yuck!)
Diffstat (limited to 'client')
-rwxr-xr-xclient/scripts/bsdos18
-rwxr-xr-xclient/scripts/freebsd18
-rwxr-xr-xclient/scripts/netbsd18
-rw-r--r--client/scripts/openbsd18
-rwxr-xr-xclient/scripts/solaris10
5 files changed, 41 insertions, 41 deletions
diff --git a/client/scripts/bsdos b/client/scripts/bsdos
index 0c38205d..1f6dede8 100755
--- a/client/scripts/bsdos
+++ b/client/scripts/bsdos
@@ -50,8 +50,8 @@ if [ x$alias_subnet_mask != x ]; then
fi
if [ x$reason = xMEDIUM ]; then
- ifconfig $interface $medium
- ifconfig $interface inet -alias 0.0.0.0 $medium >/dev/null 2>&1
+ eval "ifconfig $interface $medium"
+ eval "ifconfig $interface inet -alias 0.0.0.0 $medium" >/dev/null 2>&1
sleep 1
exit_with_hooks 0
fi
@@ -88,7 +88,7 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
fi
if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]
then
- ifconfig $interface inet -alias $old_ip_address $medium
+ eval "ifconfig $interface inet -alias $old_ip_address $medium"
route delete $old_ip_address 127.1 >/dev/null 2>&1
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
@@ -104,8 +104,8 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
fi
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
- ifconfig $interface inet $new_ip_address $new_netmask_arg \
- $new_broadcast_arg $medium
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+ $new_broadcast_arg $medium"
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
route add default $router >/dev/null 2>&1
@@ -133,7 +133,7 @@ if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ]; then
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
fi
if [ x$old_ip_address != x ]; then
- ifconfig $interface inet -alias $old_ip_address $medium
+ eval "ifconfig $interface inet -alias $old_ip_address $medium"
route delete $old_ip_address 127.1 >/dev/null 2>&1
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
@@ -160,8 +160,8 @@ if [ x$reason = xTIMEOUT ]; 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
fi
- ifconfig $interface inet $new_ip_address $new_netmask_arg \
- $new_broadcast_arg $medium
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+ $new_broadcast_arg $medium"
sleep 1
if [ "$new_routers" != "" ]; then
set $new_routers
@@ -184,7 +184,7 @@ if [ x$reason = xTIMEOUT ]; then
exit_with_hooks 0
fi
fi
- ifconfig $interface inet -alias $new_ip_address $medium
+ eval "ifconfig $interface inet -alias $new_ip_address $medium"
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
done
diff --git a/client/scripts/freebsd b/client/scripts/freebsd
index 877c2610..544ac05b 100755
--- a/client/scripts/freebsd
+++ b/client/scripts/freebsd
@@ -50,8 +50,8 @@ if [ x$alias_subnet_mask != x ]; then
fi
if [ x$reason = xMEDIUM ]; then
- ifconfig $interface $medium
- ifconfig $interface inet -alias 0.0.0.0 $medium >/dev/null 2>&1
+ eval "ifconfig $interface $medium"
+ eval "ifconfig $interface inet -alias 0.0.0.0 $medium" >/dev/null 2>&1
sleep 1
exit_with_hooks 0
fi
@@ -87,7 +87,7 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
fi
if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]
then
- ifconfig $interface inet -alias $old_ip_address $medium
+ eval "ifconfig $interface inet -alias $old_ip_address $medium"
route delete $old_ip_address 127.1 >/dev/null 2>&1
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
@@ -103,8 +103,8 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
fi
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
- ifconfig $interface inet $new_ip_address $new_netmask_arg \
- $new_broadcast_arg $medium
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+ $new_broadcast_arg $medium"
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
route add default $router >/dev/null 2>&1
@@ -132,7 +132,7 @@ if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ]; then
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
fi
if [ x$old_ip_address != x ]; then
- ifconfig $interface inet -alias $old_ip_address $medium
+ eval "ifconfig $interface inet -alias $old_ip_address $medium"
route delete $old_ip_address 127.1 >/dev/null 2>&1
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
@@ -159,8 +159,8 @@ if [ x$reason = xTIMEOUT ]; 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
fi
- ifconfig $interface inet $new_ip_address $new_netmask_arg \
- $new_broadcast_arg $medium
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+ $new_broadcast_arg $medium"
sleep 1
if [ "$new_routers" != "" ]; then
set $new_routers
@@ -183,7 +183,7 @@ if [ x$reason = xTIMEOUT ]; then
exit_with_hooks 0
fi
fi
- ifconfig $interface inet -alias $new_ip_address $medium
+ eval "ifconfig $interface inet -alias $new_ip_address $medium"
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
done
diff --git a/client/scripts/netbsd b/client/scripts/netbsd
index bb8ffb8c..404b7ac3 100755
--- a/client/scripts/netbsd
+++ b/client/scripts/netbsd
@@ -50,8 +50,8 @@ if [ x$alias_subnet_mask != x ]; then
fi
if [ x$reason = xMEDIUM ]; then
- ifconfig $interface $medium
- ifconfig $interface inet -alias 0.0.0.0 $medium >/dev/null 2>&1
+ eval "ifconfig $interface $medium"
+ eval "ifconfig $interface inet -alias 0.0.0.0 $medium" >/dev/null 2>&1
sleep 1
exit_with_hooks 0
fi
@@ -88,7 +88,7 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
fi
if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]
then
- ifconfig $interface inet -alias $old_ip_address $medium
+ eval "ifconfig $interface inet -alias $old_ip_address $medium"
route delete $old_ip_address 127.1 >/dev/null 2>&1
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
@@ -104,8 +104,8 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
fi
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
- ifconfig $interface inet $new_ip_address $new_netmask_arg \
- $new_broadcast_arg $medium
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+ $new_broadcast_arg $medium"
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
route add default $router >/dev/null 2>&1
@@ -133,7 +133,7 @@ if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ]; then
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
fi
if [ x$old_ip_address != x ]; then
- ifconfig $interface inet -alias $old_ip_address $medium
+ eval "ifconfig $interface inet -alias $old_ip_address $medium"
route delete $old_ip_address 127.1 >/dev/null 2>&1
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
@@ -160,8 +160,8 @@ if [ x$reason = xTIMEOUT ]; 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
fi
- ifconfig $interface inet $new_ip_address $new_netmask_arg \
- $new_broadcast_arg $medium
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+ $new_broadcast_arg $medium"
sleep 1
if [ "$new_routers" != "" ]; then
set $new_routers
@@ -184,7 +184,7 @@ if [ x$reason = xTIMEOUT ]; then
exit_with_hooks 0
fi
fi
- ifconfig $interface inet -alias $new_ip_address $medium
+ eval "ifconfig $interface inet -alias $new_ip_address $medium"
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
done
diff --git a/client/scripts/openbsd b/client/scripts/openbsd
index 0c38205d..1f6dede8 100644
--- a/client/scripts/openbsd
+++ b/client/scripts/openbsd
@@ -50,8 +50,8 @@ if [ x$alias_subnet_mask != x ]; then
fi
if [ x$reason = xMEDIUM ]; then
- ifconfig $interface $medium
- ifconfig $interface inet -alias 0.0.0.0 $medium >/dev/null 2>&1
+ eval "ifconfig $interface $medium"
+ eval "ifconfig $interface inet -alias 0.0.0.0 $medium" >/dev/null 2>&1
sleep 1
exit_with_hooks 0
fi
@@ -88,7 +88,7 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
fi
if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]
then
- ifconfig $interface inet -alias $old_ip_address $medium
+ eval "ifconfig $interface inet -alias $old_ip_address $medium"
route delete $old_ip_address 127.1 >/dev/null 2>&1
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
@@ -104,8 +104,8 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
fi
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
- ifconfig $interface inet $new_ip_address $new_netmask_arg \
- $new_broadcast_arg $medium
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+ $new_broadcast_arg $medium"
route add $new_ip_address 127.1 >/dev/null 2>&1
for router in $new_routers; do
route add default $router >/dev/null 2>&1
@@ -133,7 +133,7 @@ if [ x$reason = xEXPIRE ] || [ x$reason = xFAIL ]; then
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
fi
if [ x$old_ip_address != x ]; then
- ifconfig $interface inet -alias $old_ip_address $medium
+ eval "ifconfig $interface inet -alias $old_ip_address $medium"
route delete $old_ip_address 127.1 >/dev/null 2>&1
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
@@ -160,8 +160,8 @@ if [ x$reason = xTIMEOUT ]; 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
fi
- ifconfig $interface inet $new_ip_address $new_netmask_arg \
- $new_broadcast_arg $medium
+ eval "ifconfig $interface inet $new_ip_address $new_netmask_arg \
+ $new_broadcast_arg $medium"
sleep 1
if [ "$new_routers" != "" ]; then
set $new_routers
@@ -184,7 +184,7 @@ if [ x$reason = xTIMEOUT ]; then
exit_with_hooks 0
fi
fi
- ifconfig $interface inet -alias $new_ip_address $medium
+ eval "ifconfig $interface inet -alias $new_ip_address $medium"
for router in $old_routers; do
route delete default $router >/dev/null 2>&1
done
diff --git a/client/scripts/solaris b/client/scripts/solaris
index 117532f6..7ad7eaf8 100755
--- a/client/scripts/solaris
+++ b/client/scripts/solaris
@@ -52,7 +52,7 @@ relmajor=`echo $release |sed -e 's/^\([^\.]*\)\..*$/\1/'`
relminor=`echo $release |sed -e 's/^.*\.\([^\.]*\)$/\1/'`
if [ x$reason = xMEDIUM ]; then
- $ifconfig $interface $medium
+ eval "$ifconfig $interface $medium"
$ifconfig $interface
sleep 1
exit_with_hooks 0
@@ -104,8 +104,8 @@ if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \
fi
if [ x$old_ip_address = x ] || [ x$old_ip_address != x$new_ip_address ] || \
[ x$reason = xBOUND ] || [ x$reason = xREBOOT ]; then
- $ifconfig $interface inet $new_ip_address $new_netmask_arg \
- $new_broadcast_arg $medium
+ eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \
+ $new_broadcast_arg $medium"
route add $new_ip_address 127.1 1 >/dev/null 2>&1
for router in $new_routers; do
route add default $router 1 >/dev/null 2>&1
@@ -144,8 +144,8 @@ if [ x$reason = xTIMEOUT ]; then
$ifconfig ${interface}:1 0 down > /dev/null 2>&1
route delete $alias_ip_address 127.0.0.1 > /dev/null 2>&1
fi
- $ifconfig $interface inet $new_ip_address $new_netmask_arg \
- $new_broadcast_arg $medium
+ eval "$ifconfig $interface inet $new_ip_address $new_netmask_arg \
+ $new_broadcast_arg $medium"
sleep 1
set $new_routers
if ping -s -n -I 1 $1 64 1; then