summaryrefslogtreecommitdiffstats
path: root/sbin
diff options
context:
space:
mode:
Diffstat (limited to 'sbin')
-rwxr-xr-xsbin/dhclient-script5
1 files changed, 3 insertions, 2 deletions
diff --git a/sbin/dhclient-script b/sbin/dhclient-script
index 0f393a7..11ce35b 100755
--- a/sbin/dhclient-script
+++ b/sbin/dhclient-script
@@ -43,8 +43,9 @@ fi
check_hostname() {
current_hostname=`$HOSTNAME`
- if [ -z "$current_hostname" -o \
- "$current_hostname" != "$new_host_name" ]; then
+ if [ -z "$current_hostname" ] || \
+ [ "$current_hostname" = "$old_host_name" -a \
+ "$new_hostname" != "$old_host_name" ]; then
$LOGGER "New Hostname ($interface): $new_host_name"
$HOSTNAME $new_host_name
fi
OpenPOWER on IntegriCloud