summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorColin Guthrie <colin@mageia.org>2012-03-25 00:30:56 +0000
committerColin Guthrie <colin@mageia.org>2012-03-25 00:30:56 +0000
commit404662bc7d8b82d3d89b67643296b25b321af7d5 (patch)
tree47098bf4d5336ac1eab3d78acf6eadaa4df25fbb
parent0c2bc2cd4097d881996c381c94c31b2ded6b8292 (diff)
downloaddrakx-net-404662bc7d8b82d3d89b67643296b25b321af7d5.tar
drakx-net-404662bc7d8b82d3d89b67643296b25b321af7d5.tar.gz
drakx-net-404662bc7d8b82d3d89b67643296b25b321af7d5.tar.bz2
drakx-net-404662bc7d8b82d3d89b67643296b25b321af7d5.tar.xz
drakx-net-404662bc7d8b82d3d89b67643296b25b321af7d5.zip
ensure /etc/hostname has a newline as per upstream specs (#4672)
-rw-r--r--NEWS2
-rw-r--r--lib/network/network.pm2
2 files changed, 3 insertions, 1 deletions
diff --git a/NEWS b/NEWS
index 8dfa2e8..1738bc1 100644
--- a/NEWS
+++ b/NEWS
@@ -1,3 +1,5 @@
+- ensure /etc/hostname has a newline as per upstream specs (#4672)
+
1.5:
- fix CRDA never set to 'US' when country not in CRDA domains
(might help #1015 & the like)
diff --git a/lib/network/network.pm b/lib/network/network.pm
index b2efee5..0c46bc0 100644
--- a/lib/network/network.pm
+++ b/lib/network/network.pm
@@ -108,7 +108,7 @@ sub write_network_conf {
$net->{network}{NETWORKING} = 'yes';
setVarsInSh($::prefix . $network_file, $net->{network}, qw(HOSTNAME NETWORKING GATEWAY GATEWAYDEV NISDOMAIN FORWARD_IPV4 NETWORKING_IPV6 IPV6_DEFAULTDEV CRDA_DOMAIN));
- output($::prefix . $hostname_file, $net->{network}{HOSTNAME} || "localhost");
+ output($::prefix . $hostname_file, ($net->{network}{HOSTNAME} || "localhost") . "\n");
}
sub write_zeroconf {