summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Debootstrap.hs
diff options
context:
space:
mode:
authorJoey Hess <id@joeyh.name>2014-12-05 16:23:07 -0400
committerJoey Hess <id@joeyh.name>2014-12-05 16:23:07 -0400
commitdbc76b1e5225a28b84efa14659ff1c0c1d5fc463 (patch)
tree1a3f95f33ded5798987ab02cd851d8ec7ea24cfa /src/Propellor/Property/Debootstrap.hs
parenta380ea8390984afa28c2956fc9a6e011a1b93763 (diff)
parent2559b2348207ed9e914999e92fe9d26da0e1f5ad (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Property/Debootstrap.hs')
-rw-r--r--src/Propellor/Property/Debootstrap.hs8
1 files changed, 2 insertions, 6 deletions
diff --git a/src/Propellor/Property/Debootstrap.hs b/src/Propellor/Property/Debootstrap.hs
index ab5bddf4..35d9e472 100644
--- a/src/Propellor/Property/Debootstrap.hs
+++ b/src/Propellor/Property/Debootstrap.hs
@@ -9,6 +9,7 @@ module Propellor.Property.Debootstrap (
import Propellor
import qualified Propellor.Property.Apt as Apt
import Propellor.Property.Chroot.Util
+import Propellor.Property.Mount
import Utility.Path
import Utility.SafeCommand
import Utility.FileMode
@@ -95,9 +96,7 @@ built target system@(System _ arch) config =
submnts <- filter (\p -> simplifyPath p /= simplifyPath target)
. filter (dirContains target)
<$> mountPoints
- forM_ submnts $ \mnt ->
- unlessM (boolSystem "umount" [ Param "-l", Param mnt ]) $ do
- errorMessage $ "failed unmounting " ++ mnt
+ forM_ submnts umountLazy
removeDirectoryRecursive target
-- A failed debootstrap run will leave a debootstrap directory;
@@ -109,9 +108,6 @@ built target system@(System _ arch) config =
, return False
)
-mountPoints :: IO [FilePath]
-mountPoints = lines <$> readProcess "findmnt" ["-rn", "--output", "target"]
-
extractSuite :: System -> Maybe String
extractSuite (System (Debian s) _) = Just $ Apt.showSuite s
extractSuite (System (Ubuntu r) _) = Just r