summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Grub.hs
diff options
context:
space:
mode:
authorJoey Hess2017-07-28 22:18:29 -0400
committerJoey Hess2017-07-28 22:21:29 -0400
commitebe81e975882ca3d4fcfe8e80fe9747f0128e2bc (patch)
tree56369c47d6bc1143c8f24bf7226c384b135a7f85 /src/Propellor/Property/Grub.hs
parent1c37c2e853cf87c84fa36a8f654a450633199b98 (diff)
Added Mount.isMounted.
* Added Mount.isMounted. * Grub.bootsMounted: Bugfix.
Diffstat (limited to 'src/Propellor/Property/Grub.hs')
-rw-r--r--src/Propellor/Property/Grub.hs11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/Propellor/Property/Grub.hs b/src/Propellor/Property/Grub.hs
index dbc34f4b..d0516dc8 100644
--- a/src/Propellor/Property/Grub.hs
+++ b/src/Propellor/Property/Grub.hs
@@ -132,7 +132,12 @@ bootsMounted mnt wholediskdev = combineProperties desc $ props
cleanupmounts :: Property Linux
cleanupmounts = property desc $ liftIO $ do
- umountLazy (inmnt "/sys")
- umountLazy (inmnt "/proc")
- umountLazy (inmnt "/dev")
+ cleanup "/sys"
+ cleanup "/proc"
+ cleanup "/dev"
return NoChange
+ where
+ cleanup m =
+ let mp = inmnt m
+ in whenM (isMounted mp) $
+ umountLazy mp