From 6399d6d2722320346877071866414e450701fbf9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 22 Oct 2015 16:23:24 -0400 Subject: propellor spin --- src/Propellor/Property/DiskImage.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/Propellor/Property/DiskImage.hs') diff --git a/src/Propellor/Property/DiskImage.hs b/src/Propellor/Property/DiskImage.hs index 3c2b2200..8b74f478 100644 --- a/src/Propellor/Property/DiskImage.hs +++ b/src/Propellor/Property/DiskImage.hs @@ -130,14 +130,14 @@ imageBuiltFrom img chrootdir tabletype partspec final = mkimg rmimg kpartx img (partitionsPopulated chrootdir mnts) rmimg = File.notPresent img -partitionsPopulated :: FilePath -> [MountPoint] -> [FilePath] -> Property NoInfo +partitionsPopulated :: FilePath -> [MountPoint] -> [LoopDev] -> Property NoInfo partitionsPopulated chrootdir mnts devs = property desc $ mconcat $ zipWith go mnts devs where desc = "partitions populated from " ++ chrootdir go Nothing _ = noChange - go (Just mnt) dev = withTmpDir "mnt" $ \tmpdir -> bracket - (liftIO $ mount "auto" dev tmpdir) + go (Just mnt) loopdev = withTmpDir "mnt" $ \tmpdir -> bracket + (liftIO $ mount "auto" (partitionLoopDev loopdev) tmpdir) (const $ liftIO $ umountLazy tmpdir) $ \mounted -> if mounted then ensureProperty $ -- cgit v1.2.3