summaryrefslogtreecommitdiff
path: root/scripts
diff options
context:
space:
mode:
authorJames Davidson <james.davidson@vyatta.com>2012-09-19 11:48:03 -0700
committerJames Davidson <james.davidson@vyatta.com>2012-09-19 11:48:03 -0700
commitea19fe6d0b149bc50858425af4fd953dd780b18d (patch)
tree870ea6abf0041e2a8cfd1bc28d2d9fda82d64de5 /scripts
parent3403a156b0ae0257face509fbea778c906d683d7 (diff)
downloadvyatta-cfg-system-ea19fe6d0b149bc50858425af4fd953dd780b18d.tar.gz
vyatta-cfg-system-ea19fe6d0b149bc50858425af4fd953dd780b18d.zip
Set hostname after updating hosts file
Fixes bug 8380
Diffstat (limited to 'scripts')
-rwxr-xr-xscripts/system/vyatta_update_hosts.pl5
1 files changed, 2 insertions, 3 deletions
diff --git a/scripts/system/vyatta_update_hosts.pl b/scripts/system/vyatta_update_hosts.pl
index 0fb2a914..7c8bc8e6 100755
--- a/scripts/system/vyatta_update_hosts.pl
+++ b/scripts/system/vyatta_update_hosts.pl
@@ -71,9 +71,6 @@ if (defined $domain_name) {
}
$hosts_line .= " $host_name\t #vyatta entry\n";
-set_hostname $host_name;
-set_mailname $mail_name;
-
my ($out, $tempname) = tempfile($HOSTS_TMPL, UNLINK => 1)
or die "Can't create temp file: $!";
@@ -97,3 +94,5 @@ close ($out);
system("sudo cp $tempname $HOSTS_CFG") == 0
or die "Can't copy $tempname to $HOSTS_CFG: $!";
+set_hostname $host_name;
+set_mailname $mail_name;