summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/ConfFile.hs
diff options
context:
space:
mode:
authorJoey Hess2016-03-25 18:39:50 -0400
committerJoey Hess2016-03-25 18:39:50 -0400
commitce8d34d094be30e1432ecaaae81b188671180624 (patch)
tree289e2bba5ca5291c14255c5b5fe6cf6d007a1bcf /src/Propellor/Property/ConfFile.hs
parent860d1dd77e1789a91ed61bdceab667d94c9bd345 (diff)
ported more
Ssh is WIP and failing to compile quite badly
Diffstat (limited to 'src/Propellor/Property/ConfFile.hs')
-rw-r--r--src/Propellor/Property/ConfFile.hs8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/Propellor/Property/ConfFile.hs b/src/Propellor/Property/ConfFile.hs
index dac4e564..270e04f1 100644
--- a/src/Propellor/Property/ConfFile.hs
+++ b/src/Propellor/Property/ConfFile.hs
@@ -37,7 +37,7 @@ adjustSection
-> AdjustSection
-> InsertSection
-> FilePath
- -> Property NoInfo
+ -> Property UnixLike
adjustSection desc start past adjust insert = fileProperty desc go
where
go ls = let (pre, wanted, post) = foldl' find ([], [], []) ls
@@ -68,7 +68,7 @@ adjustIniSection
-> AdjustSection
-> InsertSection
-> FilePath
- -> Property NoInfo
+ -> Property UnixLike
adjustIniSection desc header =
adjustSection
desc
@@ -77,7 +77,7 @@ adjustIniSection desc header =
-- | Ensures that a .ini file exists and contains a section
-- with a key=value setting.
-containsIniSetting :: FilePath -> (IniSection, IniKey, String) -> Property NoInfo
+containsIniSetting :: FilePath -> (IniSection, IniKey, String) -> Property UnixLike
containsIniSetting f (header, key, value) =
adjustIniSection
(f ++ " section [" ++ header ++ "] contains " ++ key ++ "=" ++ value)
@@ -93,7 +93,7 @@ containsIniSetting f (header, key, value) =
isKeyVal x = (filter (/= ' ') . takeWhile (/= '=')) x `elem` [key, '#':key]
-- | Ensures that a .ini file does not contain the specified section.
-lacksIniSection :: FilePath -> IniSection -> Property NoInfo
+lacksIniSection :: FilePath -> IniSection -> Property UnixLike
lacksIniSection f header =
adjustIniSection
(f ++ " lacks section [" ++ header ++ "]")