summaryrefslogtreecommitdiff
path: root/Propellor/Property
diff options
context:
space:
mode:
authorJoey Hess2014-04-14 16:02:48 -0400
committerJoey Hess2014-04-14 16:02:48 -0400
commita83d48927044145bd7298984c36ffd16ffdbc6bd (patch)
tree2db6166b65ab81450f19aedaf2b9cf6dd602e2d2 /Propellor/Property
parent1f2c68d595bbe5591517f44cdaa9ffd7ce1e00bb (diff)
propellor spin
Diffstat (limited to 'Propellor/Property')
-rw-r--r--Propellor/Property/Apt.hs14
1 files changed, 6 insertions, 8 deletions
diff --git a/Propellor/Property/Apt.hs b/Propellor/Property/Apt.hs
index 2aeeab74..3842cb02 100644
--- a/Propellor/Property/Apt.hs
+++ b/Propellor/Property/Apt.hs
@@ -5,7 +5,6 @@ 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
@@ -196,13 +195,12 @@ reConfigure package vals = reconfigure `requires` setselections
`describe` ("reconfigure " ++ package)
where
setselections = Property "preseed" $ makeChange $
- 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 }
+ withHandle StdinHandle createProcessSuccess
+ (proc "debconf-set-selections" []) $ \h -> do
+ forM_ vals $ \(tmpl, tmpltype, value) ->
+ hPutStrLn h $ unwords [package, tmpl, tmpltype, value]
+ hClose h
+ reconfigure = cmdProperty' "dpkg-reconfigure" ["-fnone", package] noninteractiveEnv
-- | Ensures that a service is installed and running.
--