From 97597832b6a44d5daad15576f90d425487796d33 Mon Sep 17 00:00:00 2001 From: Sean Whitton Date: Sat, 10 Nov 2018 12:53:23 -0700 Subject: Libvirt.defined: use DiskImage.imageChrootNotPresent --- src/Propellor/Property/Libvirt.hs | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'src/Propellor/Property') 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" $ -- cgit v1.2.3