summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--debian/changelog1
-rw-r--r--src/Propellor/Property/Systemd.hs17
2 files changed, 16 insertions, 2 deletions
diff --git a/debian/changelog b/debian/changelog
index 214038c3..e2bbf294 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -3,6 +3,7 @@ propellor (2.7.3) UNRELEASED; urgency=medium
* Added Propellor.Property.Parted, for disk partitioning.
* Added Propellor.Property.Partition, for partition formatting etc.
* Added Propellor.Property.DiskImage, for bootable disk image creation.
+ * Update for Debian systemd-container package split.
-- Joey Hess <id@joeyh.name> Tue, 25 Aug 2015 13:45:39 -0700
diff --git a/src/Propellor/Property/Systemd.hs b/src/Propellor/Property/Systemd.hs
index 5c8a35e3..4da5b3f2 100644
--- a/src/Propellor/Property/Systemd.hs
+++ b/src/Propellor/Property/Systemd.hs
@@ -20,7 +20,8 @@ module Propellor.Property.Systemd (
-- * Journal
persistentJournal,
journaldConfigured,
- -- * Containers
+ -- * Containers and machined
+ machined,
MachineName,
Container,
container,
@@ -160,6 +161,18 @@ journaldConfigured option value =
configured "/etc/systemd/journald.conf" option value
`onChange` restarted journald
+-- | Ensures machined and machinectl are installed
+machined :: Property NoInfo
+machined = go `describe` "machined installed"
+ where
+ go = withOS ("standard sources.list") $ \o ->
+ case o of
+ -- Split into separate debian package since systemd 225.
+ (Just (System (Debian suite) _))
+ | not (isStable suite) -> ensureProperty $
+ Apt.installed ["systemd-container"]
+ _ -> noChange
+
-- | Defines a container with a given machine name.
--
-- Properties can be added to configure the Container.
@@ -250,7 +263,7 @@ nspawnService (Container name _ _) cfg = setup <!> teardown
`requires` daemonReloaded
`requires` writeservicefile
- setup = started service `requires` setupservicefile
+ setup = started service `requires` setupservicefile `requires` machined
teardown = check (doesFileExist servicefile) $
disabled service `requires` stopped service