summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Hostname.hs
diff options
context:
space:
mode:
authorJoey Hess2014-05-19 10:51:28 -0400
committerJoey Hess2014-05-19 10:51:28 -0400
commit8ab6799d4868ffc9430353597d903d7b19904f44 (patch)
tree73b3fda37645a89ba3f15861c88d71459ae2bef4 /src/Propellor/Property/Hostname.hs
parent5e46463a1065a95fff82ec566aa0ee0fb06c91c5 (diff)
Ensure that kernel hostname is same as /etc/hostname when configuring hostname.
Diffstat (limited to 'src/Propellor/Property/Hostname.hs')
-rw-r--r--src/Propellor/Property/Hostname.hs2
1 files changed, 1 insertions, 1 deletions
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"