summaryrefslogtreecommitdiffstats
path: root/sbin/dhclient-script
diff options
context:
space:
mode:
authorRenato Botelho <garga@FreeBSD.org>2014-07-07 20:12:54 -0300
committerRenato Botelho <garga@FreeBSD.org>2014-07-07 20:12:54 -0300
commit2d34e81a9f80f556fa28d3a5ef30a7a7cad5285a (patch)
tree6864d1e78e09edc8bae08c8034dca877fc8ef464 /sbin/dhclient-script
parent971de1f98a991a42c448415d34805d2970b86c4f (diff)
downloadpfsense-2d34e81a9f80f556fa28d3a5ef30a7a7cad5285a.zip
pfsense-2d34e81a9f80f556fa28d3a5ef30a7a7cad5285a.tar.gz
Avoid reseting firewall hostname by WAN DHCP. It should fix #3746
Diffstat (limited to 'sbin/dhclient-script')
-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