summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-14 14:09:41 -0400
committerJoey Hess2014-04-14 14:09:41 -0400
commitd71f8caad4576ff55a147d7d7934c8bc436519de (patch)
tree9ca849b546169c3406061d3b0fc42e9680d55af4 /Propellor/Property
parent0f08c035c7bafe13b59e3e91b426e93ee8e5092a (diff)
propellor spin
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Apache.hs8
-rw-r--r--Propellor/Property/Apt.hs2
2 files changed, 5 insertions, 5 deletions
diff --git a/Propellor/Property/Apache.hs b/Propellor/Property/Apache.hs
index f45ef9df..cf3e62cc 100644
--- a/Propellor/Property/Apache.hs
+++ b/Propellor/Property/Apache.hs
@@ -10,12 +10,12 @@ type ConfigFile = [String]
siteEnabled :: HostName -> ConfigFile -> RevertableProperty
siteEnabled hn cf = RevertableProperty enable disable
where
- enable = cmdProperty "a2ensite" ["--quiet", hn]
+ enable = trivial $ cmdProperty "a2ensite" ["--quiet", hn]
`describe` ("apache site enabled " ++ hn)
`requires` siteAvailable hn cf
`requires` installed
`onChange` reloaded
- disable = File.notPresent (siteCfg hn)
+ disable = trivial $ File.notPresent (siteCfg hn)
`describe` ("apache site disabled " ++ hn)
`onChange` cmdProperty "a2dissite" ["--quiet", hn]
`requires` installed
@@ -30,11 +30,11 @@ siteAvailable hn cf = siteCfg hn `File.hasContent` (comment:cf)
modEnabled :: String -> RevertableProperty
modEnabled modname = RevertableProperty enable disable
where
- enable = cmdProperty "a2enmod" ["--quiet", modname]
+ enable = trivial $ cmdProperty "a2enmod" ["--quiet", modname]
`describe` ("apache module enabled " ++ modname)
`requires` installed
`onChange` reloaded
- disable = cmdProperty "a2dismod" ["--quiet", modname]
+ disable = trivial $ cmdProperty "a2dismod" ["--quiet", modname]
`describe` ("apache module disabled " ++ modname)
`requires` installed
`onChange` reloaded
diff --git a/Propellor/Property/Apt.hs b/Propellor/Property/Apt.hs
index f45bc2e6..a01ab3cc 100644
--- a/Propellor/Property/Apt.hs
+++ b/Propellor/Property/Apt.hs
@@ -103,7 +103,7 @@ installed' params ps = robustly $ check (isInstallable ps) go
go = runApt $ params ++ ["install"] ++ ps
installedBackport :: [Package] -> Property
-installedBackport ps = withOS desc $ \o -> case o of
+installedBackport ps = trivial $ withOS desc $ \o -> case o of
Nothing -> error "cannot install backports; os not declared"
(Just (System (Debian suite) _))
| isStable suite ->