diff options
author | Ted Lemon <source@isc.org> | 2000-05-01 17:17:25 +0000 |
---|---|---|
committer | Ted Lemon <source@isc.org> | 2000-05-01 17:17:25 +0000 |
commit | 9f56e4372836458a27cd655254aff904fdaa44ba (patch) | |
tree | a4f62f3ff8b529212d2e87ea67a3639c609c135f /client/scripts/openbsd | |
parent | 134ceef89f11188167d91c33f32a4cb2cae39ede (diff) | |
download | isc-dhcp-9f56e4372836458a27cd655254aff904fdaa44ba.tar.gz |
Fix setting of hostname.
Diffstat (limited to 'client/scripts/openbsd')
-rw-r--r-- | client/scripts/openbsd | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/client/scripts/openbsd b/client/scripts/openbsd index d9e44b40..e6d0e2a0 100644 --- a/client/scripts/openbsd +++ b/client/scripts/openbsd @@ -72,12 +72,22 @@ fi if [ x$reason = xBOUND ] || [ x$reason = xRENEW ] || \ [ x$reason = xREBIND ] || [ x$reason = xREBOOT ]; then + current_hostname=`hostname` + if [ x$current_hostname = x ] || \ + [ x$current_hostname = x$old_host_name ]; then + if [ x$current_hostname = x ] || \ + [ x$new_host_name != x$old_host_name ]; then + hostname $new_host_name + fi + fi + if [ x$old_ip_address != x ] && [ x$alias_ip_address != x ] && \ [ x$alias_ip_address != x$old_ip_address ]; 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 - if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ]; then + if [ x$old_ip_address != x ] && [ x$old_ip_address != x$new_ip_address ] + then 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 |