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:12:54 -0300 |
commit | 2d34e81a9f80f556fa28d3a5ef30a7a7cad5285a (patch) | |
tree | 6864d1e78e09edc8bae08c8034dca877fc8ef464 /sbin | |
parent | 971de1f98a991a42c448415d34805d2970b86c4f (diff) | |
download | pfsense-2d34e81a9f80f556fa28d3a5ef30a7a7cad5285a.zip pfsense-2d34e81a9f80f556fa28d3a5ef30a7a7cad5285a.tar.gz |
Avoid reseting firewall hostname by WAN DHCP. It should fix #3746
Diffstat (limited to 'sbin')
-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 |