2
0
mirror of https://gitlab.isc.org/isc-projects/dhcp synced 2025-09-05 08:45:35 +00:00

Fix setting of hostname.

This commit is contained in:
Ted Lemon
2000-05-01 17:17:25 +00:00
parent 134ceef89f
commit 9f56e43728
7 changed files with 55 additions and 10 deletions

View File

@@ -81,6 +81,15 @@ 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}:1 inet 0 down > /dev/null 2>&1