Copyright | (c) 2017 Red Hat Inc. |
---|---|
License | LGPL |
Maintainer | https://github.com/weldr |
Stability | alpha |
Portability | portable |
Safe Haskell | None |
Language | Haskell2010 |
Parse a tmpfiles.d config file into TmpFileEntry records.
This parser is limited, it only supports types that are needed by the bdcs export tool (eg. creating files and directories)
Currently supported types are:
f Create a new file and optionally write the arg to it. Will not overwrite. F Remove existing file and make a new one, optionally writing arg to it. d Create a new directory, only if it doesn't exist. e Modify an existing directory's ownership and permissions L Create a new symlink. Do nothing if it already exists. L+ Remove file, directory tree, or symlink before creating it. WARNING this will remove a whole directory tree.
- data TmpFileEntry = TmpFileEntry {}
- data TmpFileType
- parseConfString :: String -> Either ParseError [TmpFileEntry]
- setupFilesystem :: FilePath -> FilePath -> IO ()
Documentation
data TmpFileEntry Source #
Record for the tmpfiles.d config file entries. For more detailed information on these values, see "man 5 tmpfiles.d".
TmpFileEntry | |
|
data TmpFileType Source #
Types for the tmpfiles.d config file. This is not a complete list, some don't make sense for an empty filesystem and are unimplemented NOTE Order is important, it needs to maintain at least: Directory, Symlink, File, etc. For more detailed information on these types, see "man 5 tmpfiles.d".
parseConfString :: String -> Either ParseError [TmpFileEntry] Source #
Given a string, convert it into a list of TmpFileEntry
records or a ParseError
.