diff options
| author | Joey Hess <joeyh@joeyh.name> | 2015-10-22 20:22:52 -0400 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2015-10-22 20:22:52 -0400 |
| commit | c84005cbbf432a8296ee44fec83227b15ce18d38 (patch) | |
| tree | 59bc88f9decf944878deb707b3bef9a2e8116eda /src/Propellor/Property/Mount.hs | |
| parent | 69d1021c0c12bae52cbea2cc64399be4e4b3532f (diff) | |
propellor spin
Diffstat (limited to 'src/Propellor/Property/Mount.hs')
| -rw-r--r-- | src/Propellor/Property/Mount.hs | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/Propellor/Property/Mount.hs b/src/Propellor/Property/Mount.hs index 25984afa..09016011 100644 --- a/src/Propellor/Property/Mount.hs +++ b/src/Propellor/Property/Mount.hs @@ -40,5 +40,11 @@ mounted :: FsType -> Source -> FilePath -> Property NoInfo mounted fs src mnt = property (mnt ++ " mounted") $ toResult <$> liftIO (mount fs src mnt) +-- | Bind mounts the first directory so its contents also appear +-- in the second directory. +bindMount :: FilePath -> FilePath -> Property NoInfo +bindMount src dest = cmdProperty "mount" ["--bind", src, dest] + `describe` ("bind mounted " ++ src ++ " to " ++ dest) + mount :: FsType -> Source -> FilePath -> IO Bool mount fs src mnt = boolSystem "mount" [Param "-t", Param fs, Param src, Param mnt] |
