From 9d4655cf55ec0ab2d95b707e6b5ff009f0515bcd Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 20 Dec 2017 18:16:14 -0400 Subject: 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. --- src/Propellor/Property/Mount.hs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/Propellor/Property/Mount.hs') 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 -- cgit v1.2.3