From 1f2c68d595bbe5591517f44cdaa9ffd7ce1e00bb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 14 Apr 2014 16:01:17 -0400 Subject: propellor spin --- Propellor/Property/Apt.hs | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) (limited to 'Propellor/Property/Apt.hs') 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. -- -- cgit v1.3-2-g0d8e