diff options
| author | Sean Whitton <spwhitton@spwhitton.name> | 2018-06-15 16:44:05 +0100 |
|---|---|---|
| committer | Joey Hess <joeyh@joeyh.name> | 2018-06-16 07:46:51 -0400 |
| commit | 87cfaae69f29e156a7bcb5b1924b806056c4401c (patch) | |
| tree | 5c4af2ed600a0a2c86d2cc3f654ecf179f079a6d /src/Propellor/Property/EtcDefault.hs | |
| parent | 6bbad0c9411872aa01af2babd54436590a5e3f33 (diff) | |
add EtcDefault.set
Signed-off-by: Sean Whitton <spwhitton@spwhitton.name>
Diffstat (limited to 'src/Propellor/Property/EtcDefault.hs')
| -rw-r--r-- | src/Propellor/Property/EtcDefault.hs | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/src/Propellor/Property/EtcDefault.hs b/src/Propellor/Property/EtcDefault.hs new file mode 100644 index 00000000..0bda5c64 --- /dev/null +++ b/src/Propellor/Property/EtcDefault.hs @@ -0,0 +1,17 @@ +-- | Maintainer: Sean Whitton <spwhitton@spwhitton.name> + +module Propellor.Property.EtcDefault ( + EtcDefaultFile, + set, +) where + +import Propellor.Base +import Propellor.Property.ConfFile + +-- | The name of a file in </etc/default>, without the </etc/default> prefix. +-- E.g. @useradd@. +type EtcDefaultFile = String + +-- | Set a key=value pair in a file in </etc/default>. +set :: EtcDefaultFile -> ShellKey -> String -> Property UnixLike +set f key value = containsShellSetting ("/etc/default" </> f) (key, value) |
