From 9f56e4372836458a27cd655254aff904fdaa44ba Mon Sep 17 00:00:00 2001 From: Ted Lemon Date: Mon, 1 May 2000 17:17:25 +0000 Subject: Fix setting of hostname. --- client/scripts/openbsd | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) (limited to 'client/scripts/openbsd') 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 -- cgit v1.2.1