summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Mount.hs
diff options
context:
space:
mode:
authorJoey Hess2015-10-22 20:13:47 -0400
committerJoey Hess2015-10-22 20:13:47 -0400
commit9f09b6236d33d68850f8d99d1ea482c47b47ae84 (patch)
tree61a5d8d956e022d2977d139fbf1786d3825302a7 /src/Propellor/Property/Mount.hs
parent9c1630d3c17b495ce97dfff5bd4a94c98c5b46db (diff)
disk image finalization may work
Diffstat (limited to 'src/Propellor/Property/Mount.hs')
-rw-r--r--src/Propellor/Property/Mount.hs4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/Propellor/Property/Mount.hs b/src/Propellor/Property/Mount.hs
index 30d057f5..25984afa 100644
--- a/src/Propellor/Property/Mount.hs
+++ b/src/Propellor/Property/Mount.hs
@@ -36,5 +36,9 @@ unmountBelow d = do
forM_ submnts umountLazy
-- | Mounts a device.
+mounted :: FsType -> Source -> FilePath -> Property NoInfo
+mounted fs src mnt = property (mnt ++ " mounted") $
+ toResult <$> liftIO (mount fs src mnt)
+
mount :: FsType -> Source -> FilePath -> IO Bool
mount fs src mnt = boolSystem "mount" [Param "-t", Param fs, Param src, Param mnt]