summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Mount.hs
diff options
context:
space:
mode:
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