diff options
author | Renato Botelho <garga@FreeBSD.org> | 2014-07-07 20:12:54 -0300 |
---|---|---|
committer | Renato Botelho <garga@FreeBSD.org> | 2014-07-07 20:13:03 -0300 |
commit | 7b15d22967a9f9fefe7b8b11fa2d68c762c55219 (patch) | |
tree | e5dbd991d444a6aa6ef58ebffee7b158dcedfebc | |
parent | 9b8c7295f049c73920057b786628ad0994274fb9 (diff) | |
download | pfsense-7b15d22967a9f9fefe7b8b11fa2d68c762c55219.zip pfsense-7b15d22967a9f9fefe7b8b11fa2d68c762c55219.tar.gz |
Avoid reseting firewall hostname by WAN DHCP. It should fix #3746
-rwxr-xr-x | sbin/dhclient-script | 5 |
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 |