summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Mount.hs
diff options
context:
space:
mode:
authorJoey Hess2016-06-13 19:26:15 -0400
committerJoey Hess2016-06-13 19:26:15 -0400
commit1ec80f39f6fe4da60d4e3b3ea9f256c5d7b4cd24 (patch)
tree9d162fa99cb297f9d43288ba51e820be89e2daaf /src/Propellor/Property/Mount.hs
parent3893a43774eee2a01df19c15c6c59c6f6d358c29 (diff)
throw StopPropellorException if unmounting fails
It would be bad if unmount somehow failed and then another property tried to reformat the mounted device or rm -rf the mount point. While I don't see anything that does that, and while lazy umount can't fail as far as I know, it was throwing an exception that stopped propellor and let's cautiously keep it that way.
Diffstat (limited to 'src/Propellor/Property/Mount.hs')
-rw-r--r--src/Propellor/Property/Mount.hs2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/Propellor/Property/Mount.hs b/src/Propellor/Property/Mount.hs
index bb0f60a7..026509a9 100644
--- a/src/Propellor/Property/Mount.hs
+++ b/src/Propellor/Property/Mount.hs
@@ -118,7 +118,7 @@ blkidTag tag dev = catchDefaultIO Nothing $
umountLazy :: FilePath -> IO ()
umountLazy mnt =
unlessM (boolSystem "umount" [ Param "-l", Param mnt ]) $
- errorMessage $ "failed unmounting " ++ mnt
+ stopPropellorMessage $ "failed unmounting " ++ mnt
-- | Unmounts anything mounted inside the specified directory.
unmountBelow :: FilePath -> IO ()