summaryrefslogtreecommitdiff
path: root/src/Propellor/Property
diff options
context:
space:
mode:
authorSean Whitton2018-11-10 12:53:23 -0700
committerSean Whitton2018-11-10 16:15:35 -0700
commit97597832b6a44d5daad15576f90d425487796d33 (patch)
tree87c3a450a73044d1fedb71d59d4e52f13dc19516 /src/Propellor/Property
parent979f1459cf61886ab24302c8a11637965b7c77aa (diff)
Libvirt.defined: use DiskImage.imageChrootNotPresent
Diffstat (limited to 'src/Propellor/Property')
-rw-r--r--src/Propellor/Property/Libvirt.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/src/Propellor/Property/Libvirt.hs b/src/Propellor/Property/Libvirt.hs
index 05ce074a..8c6252f1 100644
--- a/src/Propellor/Property/Libvirt.hs
+++ b/src/Propellor/Property/Libvirt.hs
@@ -15,7 +15,6 @@ import Propellor.Base
import Propellor.Types.Info
import Propellor.Property.Chroot
import Propellor.Property.DiskImage
-import Propellor.Property.Chroot.Util (removeChroot)
import qualified Propellor.Property.Apt as Apt
import Utility.Split
@@ -112,12 +111,10 @@ defined imageType (MiBMemory mem) (NumVCPUs cpus) auto h =
built = check (not <$> doesFileExist imageLoc) $
setupRevertableProperty $ imageBuiltFor h
(image) (Debootstrapped mempty)
+
nuked :: Property UnixLike
- nuked = check (doesDirectoryExist (imageLoc <.> "chroot")) $
- property "destroy the chroot used to build the image" $ do
- liftIO $ removeChroot (imageLoc <.> "chroot")
- liftIO $ nukeFile (imageLoc <.> "parttable")
- return MadeChange
+ nuked = imageChrootNotPresent image
+
xmlDefined :: Property UnixLike
xmlDefined = check (not <$> doesFileExist conf) $
property "define the libvirt VM" $