From 6cdd37d9ff3ff3e3b8439445c1363b9bdc77a5da Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 21 Nov 2014 20:53:38 -0400 Subject: propellor spin --- src/Propellor/Property/Systemd.hs | 6 ++++-- 1 file changed, 4 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 554e6b20..a2130a21 100644 --- a/src/Propellor/Property/Systemd.hs +++ b/src/Propellor/Property/Systemd.hs @@ -10,6 +10,7 @@ module Propellor.Property.Systemd ( container, nspawned, containerCfg, + resolvConfed, ) where import Propellor @@ -30,6 +31,7 @@ type ServiceName = String type MachineName = String data Container = Container MachineName Chroot.Chroot Host + deriving (Show) instance Hostlike Container where (Container n c h) & p = Container n c (h & p) @@ -166,7 +168,7 @@ nspawnService (Container name _ _) cfg = RevertableProperty setup teardown disabled service `requires` stopped service nspawnServiceParams :: ChrootCfg -> [String] -nspawnServiceParams ChrootCfg = [] +nspawnServiceParams NoChrootCfg = [] nspawnServiceParams (SystemdNspawnCfg ps) = M.keys $ M.filter id $ M.fromList ps @@ -220,7 +222,7 @@ mungename = replace "/" "_" containerCfg :: String -> RevertableProperty containerCfg p = RevertableProperty (mk True) (mk False) where - mk b = pureInfoProperty ("container configured " ++ if b then "with " else "without " ++ p') $ + mk b = pureInfoProperty ("container configuration " ++ (if b then "" else "without ") ++ p') $ mempty { _chrootinfo = mempty { _chrootCfg = SystemdNspawnCfg [(p', b)] } } p' = case p of ('-':_) -> p -- cgit v1.2.3