From 8ab6799d4868ffc9430353597d903d7b19904f44 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 19 May 2014 10:51:28 -0400 Subject: Ensure that kernel hostname is same as /etc/hostname when configuring hostname. --- debian/changelog | 2 ++ src/Propellor/Property/Hostname.hs | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/debian/changelog b/debian/changelog index 70d66e0a..9d1d9a1c 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,6 +1,8 @@ propellor (0.5.3) UNRELEASED; urgency=medium * Fix unattended-upgrades config for !stable. + * Ensure that kernel hostname is same as /etc/hostname when configuring + hostname. -- Joey Hess Sun, 18 May 2014 13:44:00 -0400 diff --git a/src/Propellor/Property/Hostname.hs b/src/Propellor/Property/Hostname.hs index 031abb9d..d5af32a9 100644 --- a/src/Propellor/Property/Hostname.hs +++ b/src/Propellor/Property/Hostname.hs @@ -13,7 +13,6 @@ sane = property ("sane hostname") (ensureProperty . setTo =<< getHostName) setTo :: HostName -> Property setTo hn = combineProperties desc go - `onChange` cmdProperty "hostname" [basehost] where desc = "hostname " ++ hn (basehost, domain) = separate (== '.') hn @@ -24,6 +23,7 @@ setTo hn = combineProperties desc go then Nothing else Just $ File.fileProperty desc addhostline "/etc/hosts" + , cmdProperty "hostname" [basehost] ] hostip = "127.0.1.1" -- cgit v1.3-2-g0d8e