diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-10-22 16:23:24 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-10-22 16:23:24 -0400 |
| commit | 6399d6d2722320346877071866414e450701fbf9 (patch) | |
| tree | a7874c1402142abef5b08799adf284ba0035b683 /src/Propellor/Property/DiskImage.hs | |
| parent | d18f1e9e49eff5ca8d43845e2b9ce6483d219ffc (diff) | |
propellor spin
Diffstat (limited to 'src/Propellor/Property/DiskImage.hs')
| -rw-r--r-- | src/Propellor/Property/DiskImage.hs | 6 |
1 files changed, 3 insertions, 3 deletions
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 $ |
