From 1ec80f39f6fe4da60d4e3b3ea9f256c5d7b4cd24 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 13 Jun 2016 19:26:15 -0400 Subject: 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. --- src/Propellor/Property/Mount.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/Propellor/Property/Mount.hs') 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 () -- cgit v1.2.3