Ensure that kernel hostname is same as /etc/hostname when configuring hostname.

This commit is contained in:
Joey Hess 2014-05-19 10:51:28 -04:00
parent 5e46463a10
commit 8ab6799d48
2 changed files with 3 additions and 1 deletions

2
debian/changelog vendored
View File

@ -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 <joeyh@debian.org> Sun, 18 May 2014 13:44:00 -0400

View File

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