summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Debootstrap.hs
diff options
context:
space:
mode:
authorJoey Hess2014-12-04 17:11:15 -0400
committerJoey Hess2014-12-04 17:11:15 -0400
commitf1fd75c9ecee5f398a25488c73a541d4135887da (patch)
tree9801546d9d8960e7019c9cdc05624189bb5f2353 /src/Propellor/Property/Debootstrap.hs
parentf78c2f16d1c93ee6fe2620916b7584d91d116723 (diff)
more work on OS takeover
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