summaryrefslogtreecommitdiff
path: root/Property
diff options
context:
space:
mode:
authorJoey Hess2014-03-30 00:33:45 -0400
committerJoey Hess2014-03-30 00:33:45 -0400
commit38e626da7fa0db62c16dee4eb783fff2ce952378 (patch)
tree1b9c3a1583fcced2f907a14797e69b18dfefaf6b /Property
parent3368bdd0a18a58f10fbec8880562ad63b85bcfd5 (diff)
improve
Diffstat (limited to 'Property')
-rw-r--r--Property/Hostname.hs7
1 files changed, 3 insertions, 4 deletions
diff --git a/Property/Hostname.hs b/Property/Hostname.hs
index 0529d213..7baf7178 100644
--- a/Property/Hostname.hs
+++ b/Property/Hostname.hs
@@ -6,7 +6,6 @@ import Utility.SafeCommand
type HostName = String
set :: HostName -> Property
-set hostname = combineProperties ("hostname " ++ hostname)
- [ fileHasContent "/etc/hostname" [hostname]
- , cmdProperty "hostname" [Param hostname]
- ]
+set hostname =
+ fileHasContent "/etc/hostname" [hostname]
+ `onChange` cmdProperty "hostname" [Param hostname]