summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Mount.hs
diff options
context:
space:
mode:
authorJoey Hess2017-12-20 18:16:14 -0400
committerJoey Hess2017-12-20 18:17:42 -0400
commit9d4655cf55ec0ab2d95b707e6b5ff009f0515bcd (patch)
treed5e7a40f24425a24a5a56f57ba3938651d567eee /src/Propellor/Property/Mount.hs
parent704259a2b4d11443c74e1dd4dd2ef1ba8d36ffd0 (diff)
two diskimage edge case fixes
* DiskImage: Fix rsync crash when a mount point does not exist in the chroot. * Fix bug in unmountBelow that caused unmounting of nested mounts to fail. This commit was sponsored by Jack Hill on Patreon.
Diffstat (limited to 'src/Propellor/Property/Mount.hs')
-rw-r--r--src/Propellor/Property/Mount.hs4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/Propellor/Property/Mount.hs b/src/Propellor/Property/Mount.hs
index c047161d..e8f3f092 100644
--- a/src/Propellor/Property/Mount.hs
+++ b/src/Propellor/Property/Mount.hs
@@ -149,4 +149,6 @@ umountLazy mnt =
unmountBelow :: FilePath -> IO ()
unmountBelow d = do
submnts <- mountPointsBelow d
- forM_ submnts umountLazy
+ -- sort so sub-mounts are unmounted before the mount point
+ -- containing them
+ forM_ (sort submnts) umountLazy