From 6c7800a0380d62ae9cdc385625053fe656aebcb1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 31 Aug 2015 10:16:51 -0700 Subject: Update for Debian systemd-container package split. --- src/Propellor/Property/Systemd.hs | 17 +++++++++++++++-- 1 file changed, 15 insertions(+), 2 deletions(-) (limited to 'src') 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 -- cgit v1.2.3