diff options
| author | Joey Hess <id@joeyh.name> | 2014-12-04 16:50:00 -0400 |
|---|---|---|
| committer | Joey Hess <id@joeyh.name> | 2014-12-04 16:50:00 -0400 |
| commit | bf4840f341c83f28a53cf80fd7750a661e734d65 (patch) | |
| tree | 3376f3825fe1ea1db9352357dc6a577b9429c0d7 /src/Propellor/Property/Mount.hs | |
| parent | e47fbd9b39708e3488e047a5c22565ff23e79d46 (diff) | |
propellor spin
Diffstat (limited to 'src/Propellor/Property/Mount.hs')
| -rw-r--r-- | src/Propellor/Property/Mount.hs | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/Propellor/Property/Mount.hs b/src/Propellor/Property/Mount.hs new file mode 100644 index 00000000..804407e9 --- /dev/null +++ b/src/Propellor/Property/Mount.hs @@ -0,0 +1,12 @@ +module Propellor.Property.Mount where + +import Propellor +import Utility.SafeCommand + +mountPoints :: IO [FilePath] +mountPoints = lines <$> readProcess "findmnt" ["-rn", "--output", "target"] + +umountLazy :: FilePath -> IO () +umountLazy mnt = + unlessM (boolSystem "umount" [ Param "-l", Param mnt ]) $ + errorMessage $ "failed unmounting " ++ mnt |
