From def53b64cc17b95eb5729dd97a800dfe1257b352 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 6 Sep 2015 08:19:02 -0700 Subject: Added Propellor.Property.Rsync. WIP; untested Convert Info to use Data.Dynamic, so properties can export and consume info of any type that is Typeable and a Monoid, including data types private to a module. (API change) Thanks to Joachim Breitner for the idea. --- src/Propellor/Property/Systemd.hs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property/Systemd.hs') diff --git a/src/Propellor/Property/Systemd.hs b/src/Propellor/Property/Systemd.hs index 4da5b3f2..e44ef717 100644 --- a/src/Propellor/Property/Systemd.hs +++ b/src/Propellor/Property/Systemd.hs @@ -43,6 +43,7 @@ module Propellor.Property.Systemd ( import Propellor import Propellor.Types.Chroot import Propellor.Types.Container +import Propellor.Types.Info import qualified Propellor.Property.Chroot as Chroot import qualified Propellor.Property.Apt as Apt import qualified Propellor.Property.File as File @@ -209,7 +210,7 @@ nspawned c@(Container name (Chroot.Chroot loc system builderconf _) h) = where p = enterScript c `before` chrootprovisioned - `before` nspawnService c (_chrootCfg $ _chrootinfo $ hostInfo h) + `before` nspawnService c (_chrootCfg $ getInfo $ hostInfo h) `before` containerprovisioned -- Chroot provisioning is run in systemd-only mode, @@ -328,7 +329,7 @@ containerCfg :: String -> RevertableProperty containerCfg p = RevertableProperty (mk True) (mk False) where mk b = pureInfoProperty ("container configuration " ++ (if b then "" else "without ") ++ p') $ - mempty { _chrootinfo = mempty { _chrootCfg = SystemdNspawnCfg [(p', b)] } } + mempty { _chrootCfg = SystemdNspawnCfg [(p', b)] } p' = case p of ('-':_) -> p _ -> "--" ++ p -- cgit v1.3-2-g0d8e