summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Systemd.hs
diff options
context:
space:
mode:
authorJoey Hess2019-01-18 02:19:41 -0400
committerJoey Hess2019-01-18 02:19:41 -0400
commitd004b02c1704168ab59e59ec76d7d572c79a0423 (patch)
tree14ef7f324cace020c036d393d7dac5eeb65e3f55 /src/Propellor/Property/Systemd.hs
parent3328fb83373adad786e57d4ed47e1d801e14260f (diff)
parentb9d9333e030ac59ea11d435b7e2e4758daff4b4a (diff)
Merge branch 'master' into joeyconfig
Diffstat (limited to 'src/Propellor/Property/Systemd.hs')
-rw-r--r--src/Propellor/Property/Systemd.hs19
1 files changed, 12 insertions, 7 deletions
diff --git a/src/Propellor/Property/Systemd.hs b/src/Propellor/Property/Systemd.hs
index cb63ff5a..9c9f5914 100644
--- a/src/Propellor/Property/Systemd.hs
+++ b/src/Propellor/Property/Systemd.hs
@@ -204,13 +204,18 @@ killUserProcesses = set "yes" <!> set "no"
-- | Ensures machined and machinectl are installed
machined :: Property Linux
-machined = withOS "machined installed" $ \w o ->
- case o of
- -- Split into separate debian package since systemd 225.
- (Just (System (Debian _ suite) _))
- | not (isStable suite) || suite == (Stable "stretch") ->
- ensureProperty w $ Apt.installed ["systemd-container"]
- _ -> noChange
+machined = installeddebian `pickOS` assumeinstalled
+ where
+ installeddebian :: Property DebianLike
+ installeddebian = withOS "machined installed" $ \w o ->
+ case o of
+ -- Split into separate debian package since systemd 225.
+ (Just (System (Debian _ suite) _))
+ | not (isStable suite) || suite == (Stable "stretch") ->
+ ensureProperty w $ Apt.installed ["systemd-container"]
+ _ -> noChange
+ assumeinstalled :: Property Linux
+ assumeinstalled = doNothing
-- | Defines a container with a given machine name,
-- and how to create its chroot if not already present.