Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Properties in this module ensure that things are currently mounted,
but without making the mount persistent. Use Fstab
to configure persistent mounts.
Synopsis
- type FsType = String
- type Source = String
- type MountPoint = FilePath
- newtype MountOpts = MountOpts [String]
- class ToMountOpts a where
- toMountOpts :: a -> MountOpts
- formatMountOpts :: MountOpts -> String
- mounted :: FsType -> Source -> MountPoint -> MountOpts -> Property UnixLike
- bindMount :: FilePath -> FilePath -> Property Linux
- swapOn :: Source -> RevertableProperty Linux Linux
- mount :: FsType -> Source -> MountPoint -> MountOpts -> IO Bool
- mountPoints :: IO [MountPoint]
- isMounted :: MountPoint -> IO Bool
- mountPointsBelow :: FilePath -> IO [MountPoint]
- partialBindMountsOf :: FilePath -> IO [MountPoint]
- getFsType :: MountPoint -> IO (Maybe FsType)
- getFsMountOpts :: MountPoint -> IO MountOpts
- type UUID = String
- getMountUUID :: MountPoint -> IO (Maybe UUID)
- getSourceUUID :: Source -> IO (Maybe UUID)
- type Label = String
- getMountLabel :: MountPoint -> IO (Maybe Label)
- getSourceLabel :: Source -> IO (Maybe UUID)
- getMountSource :: MountPoint -> IO (Maybe Source)
- getMountContaining :: FilePath -> IO (Maybe Source)
- findmntField :: String -> [String] -> IO (Maybe String)
- blkidTag :: String -> Source -> IO (Maybe String)
- umountLazy :: FilePath -> IO ()
- unmountBelow :: FilePath -> IO ()
Documentation
type MountPoint = FilePath Source #
A mount point for a filesystem.
Filesystem mount options. Eg, MountOpts ["errors=remount-ro"]
For default mount options, use mempty
.
class ToMountOpts a where Source #
toMountOpts :: a -> MountOpts Source #
Instances
ToMountOpts MountOpts Source # | |
Defined in Propellor.Property.Mount toMountOpts :: MountOpts -> MountOpts Source # | |
ToMountOpts String Source # | |
Defined in Propellor.Property.Mount toMountOpts :: String -> MountOpts Source # |
formatMountOpts :: MountOpts -> String Source #
mounted :: FsType -> Source -> MountPoint -> MountOpts -> Property UnixLike Source #
Mounts a device, without listing it in /etc/fstab.
Note that this property will fail if the device is already mounted at the MountPoint.
bindMount :: FilePath -> FilePath -> Property Linux Source #
Bind mounts the first directory so its contents also appear in the second directory.
swapOn :: Source -> RevertableProperty Linux Linux Source #
Enables swapping to a device, which must be formatted already as a swap partition.
mountPoints :: IO [MountPoint] Source #
Lists all mount points of the system.
mountPointsBelow :: FilePath -> IO [MountPoint] Source #
Finds all filesystems mounted inside the specified directory.
partialBindMountsOf :: FilePath -> IO [MountPoint] Source #
Get mountpoints which are bind mounts of subdirectories of mounted filesystems
E.g. as created by mount --bind etcfoo etcbar
where etcfoo
is not
itself a mount point, but just a subdirectory. These are sometimes known as
"partial bind mounts"
getFsMountOpts :: MountPoint -> IO MountOpts Source #
Mount options for the filesystem mounted at a given location.
getMountUUID :: MountPoint -> IO (Maybe UUID) Source #
UUID of filesystem mounted at a given location.
getMountLabel :: MountPoint -> IO (Maybe Label) Source #
Label of filesystem mounted at a given location.
getMountSource :: MountPoint -> IO (Maybe Source) Source #
Device mounted at a given location.
getMountContaining :: FilePath -> IO (Maybe Source) Source #
Device that a given path is located within.
umountLazy :: FilePath -> IO () Source #
Unmounts a device or mountpoint, lazily so any running processes don't block it.
Note that this will fail if it's not mounted.
unmountBelow :: FilePath -> IO () Source #
Unmounts anything mounted inside the specified directory, not including the directory itself.