Avoid reseting firewall hostname by WAN DHCP. It should fix #3746

This commit is contained in:
Renato Botelho 2014-07-07 20:12:54 -03:00
parent 9b8c7295f0
commit 7b15d22967
1 changed files with 3 additions and 2 deletions

View File

@ -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