summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Chroot.hs
diff options
context:
space:
mode:
authorJoey Hess2014-11-21 14:11:02 -0400
committerJoey Hess2014-11-21 14:11:02 -0400
commit7d4d3e44518aef38e7c036e76dfaf8e6f1c21bdb (patch)
tree99d3c85472f270d406b32e749558a7a77bd62862 /src/Propellor/Property/Chroot.hs
parent5e1a47552a07b596b0b264ca752025335b29e45b (diff)
fix info propigation
Need to propigate the full container info, not the subset used in chroot deployment.
Diffstat (limited to 'src/Propellor/Property/Chroot.hs')
-rw-r--r--src/Propellor/Property/Chroot.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Propellor/Property/Chroot.hs b/src/Propellor/Property/Chroot.hs
index e7bac84a..7fee3a59 100644
--- a/src/Propellor/Property/Chroot.hs
+++ b/src/Propellor/Property/Chroot.hs
@@ -3,6 +3,8 @@ module Propellor.Property.Chroot (
chroot,
provisioned,
-- * Internal use
+ provisioned',
+ propigateChrootInfo,
propellChroot,
chain,
) where
@@ -38,8 +40,11 @@ chroot location system = Chroot location system (Host location [] mempty)
-- Reverting this property removes the chroot. Note that it does not ensure
-- that any processes that might be running inside the chroot are stopped.
provisioned :: Chroot -> RevertableProperty
-provisioned c@(Chroot loc system _) = RevertableProperty
- (propigateChrootInfo c (go "exists" setup))
+provisioned c = provisioned' (propigateChrootInfo c) c
+
+provisioned' :: (Property -> Property) -> Chroot -> RevertableProperty
+provisioned' propigator c@(Chroot loc system _) = RevertableProperty
+ (propigator $ go "exists" setup)
(go "removed" teardown)
where
go desc a = property (chrootDesc c desc) $ ensureProperties [a]