summaryrefslogtreecommitdiff
path: root/Propellor
diff options
context:
space:
mode:
authorJoey Hess2014-04-14 16:01:17 -0400
committerJoey Hess2014-04-14 16:01:17 -0400
commit1f2c68d595bbe5591517f44cdaa9ffd7ce1e00bb (patch)
treef5ede247370d802ba300f0faed6fce573dc03474 /Propellor
parent0f3226a29812682854e9c9beb4b2b684ddbbe655 (diff)
propellor spin
Diffstat (limited to 'Propellor')
-rw-r--r--Propellor/Property/Apt.hs12
-rw-r--r--Propellor/Property/Postfix.hs2
2 files changed, 8 insertions, 6 deletions
diff --git a/Propellor/Property/Apt.hs b/Propellor/Property/Apt.hs
index a01ab3cc..2aeeab74 100644
--- a/Propellor/Property/Apt.hs
+++ b/Propellor/Property/Apt.hs
@@ -5,6 +5,7 @@ import Control.Applicative
import Data.List
import System.IO
import Control.Monad
+import System.Process (env)
import Propellor
import qualified Propellor.Property.File as File
@@ -195,12 +196,13 @@ reConfigure package vals = reconfigure `requires` setselections
`describe` ("reconfigure " ++ package)
where
setselections = Property "preseed" $ makeChange $
- withHandle StdinHandle createProcessSuccess
- (proc "debconf-set-selections" []) $ \h -> do
- forM_ vals $ \(tmpl, tmpltype, value) ->
- hPutStrLn h $ unwords [package, tmpl, tmpltype, value]
- hClose h
+ withHandle StdinHandle createProcessSuccess p $ \h -> do
+ forM_ vals $ \(tmpl, tmpltype, value) ->
+ hPutStrLn h $ unwords [package, tmpl, tmpltype, value]
+ hClose h
reconfigure = cmdProperty "dpkg-reconfigure" ["-fnone", package]
+ p = (proc "debconf-set-selections" [])
+ { env = Just noninteractiveEnv }
-- | Ensures that a service is installed and running.
--
diff --git a/Propellor/Property/Postfix.hs b/Propellor/Property/Postfix.hs
index 49676640..f4be27cf 100644
--- a/Propellor/Property/Postfix.hs
+++ b/Propellor/Property/Postfix.hs
@@ -15,7 +15,7 @@ installed = Apt.serviceInstalledRunning "postfix"
satellite :: Property
satellite = setup `requires` installed
where
- setup = Property "postfix satellite system" $ do
+ setup = trivial $ Property "postfix satellite system" $ do
hn <- getHostName
ensureProperty $ Apt.reConfigure "postfix"
[ ("postfix/main_mailer_type", "select", "Satellite system")