diff options
Diffstat (limited to 'src/Propellor/Property/Grub.hs')
| -rw-r--r-- | src/Propellor/Property/Grub.hs | 11 |
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 |
