summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJoey Hess2014-11-21 01:09:15 -0400
committerJoey Hess2014-11-21 01:09:15 -0400
commit45349c210d0822e6041015d7681887ff02f87ce0 (patch)
tree2376456afba4cb6de7ad3c1a1d4fd21b22798030
parenta904476333bcacfbed5d0ca95e8f8b3cca9fb327 (diff)
add missing support for reverting chroot
wow, that was suprisingly trivial!
-rw-r--r--src/Propellor/Property/Chroot.hs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/Propellor/Property/Chroot.hs b/src/Propellor/Property/Chroot.hs
index e6c2c84e..874d7750 100644
--- a/src/Propellor/Property/Chroot.hs
+++ b/src/Propellor/Property/Chroot.hs
@@ -42,15 +42,15 @@ provisioned c@(Chroot loc system _) = RevertableProperty
where
go desc a = property (chrootDesc c desc) $ ensureProperties [a]
- setup = provisionChroot c `requires` built
+ setup = provisionChroot c `requires` toProp built
built = case system of
(System (Debian _) _) -> debootstrap
(System (Ubuntu _) _) -> debootstrap
- debootstrap = toProp (Debootstrap.built loc system [])
+ debootstrap = Debootstrap.built loc system []
- teardown = undefined
+ teardown = toProp (revert built)
propigateChrootInfo :: Chroot -> Property -> Property
propigateChrootInfo c p = propigateInfo c p (<> chrootInfo c)