summaryrefslogtreecommitdiffstats
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:13:03 -0300
commit7b15d22967a9f9fefe7b8b11fa2d68c762c55219 (patch)
treee5dbd991d444a6aa6ef58ebffee7b158dcedfebc
parent9b8c7295f049c73920057b786628ad0994274fb9 (diff)
downloadpfsense-7b15d22967a9f9fefe7b8b11fa2d68c762c55219.zip
pfsense-7b15d22967a9f9fefe7b8b11fa2d68c762c55219.tar.gz
Avoid reseting firewall hostname by WAN DHCP. It should fix #3746
-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