summaryrefslogtreecommitdiff
path: root/src/Propellor/Property/Chroot.hs
diff options
context:
space:
mode:
authorJoey Hess2014-11-23 14:41:09 -0400
committerJoey Hess2014-11-23 14:41:09 -0400
commitac41f8b07b45b1855b1c10665757691a56b08353 (patch)
treed446f81a4068ca594abd881c2b055ad2f8662a12 /src/Propellor/Property/Chroot.hs
parent1b34f23414b574105ddfdf36fbeb86aa115a0e2e (diff)
parent3c952a0de9d228eafe6e208007be7d2e018d68b8 (diff)
Merge branch 'joeyconfig'
Diffstat (limited to 'src/Propellor/Property/Chroot.hs')
-rw-r--r--src/Propellor/Property/Chroot.hs7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/Propellor/Property/Chroot.hs b/src/Propellor/Property/Chroot.hs
index c3b14a8e..3da8b0d6 100644
--- a/src/Propellor/Property/Chroot.hs
+++ b/src/Propellor/Property/Chroot.hs
@@ -11,6 +11,7 @@ module Propellor.Property.Chroot (
import Propellor
import Propellor.Types.Chroot
+import Propellor.Property.Chroot.Util
import qualified Propellor.Property.Debootstrap as Debootstrap
import qualified Propellor.Property.Systemd.Core as Systemd
import qualified Propellor.Shim as Shim
@@ -88,7 +89,7 @@ propellChroot c@(Chroot loc _ _ _) mkproc systemdonly = property (chrootDesc c "
let me = localdir </> "propellor"
shim <- liftIO $ ifM (doesDirectoryExist d)
( pure (Shim.file me d)
- , Shim.setup me d
+ , Shim.setup me Nothing d
)
ifM (liftIO $ bindmount shim)
( chainprovision shim
@@ -109,12 +110,14 @@ propellChroot c@(Chroot loc _ _ _) mkproc systemdonly = property (chrootDesc c "
chainprovision shim = do
parenthost <- asks hostName
cmd <- liftIO $ toChain parenthost c systemdonly
+ pe <- liftIO standardPathEnv
let p = mkproc
[ shim
, "--continue"
, show cmd
]
- liftIO $ withHandle StdoutHandle createProcessSuccess p
+ let p' = p { env = Just pe }
+ liftIO $ withHandle StdoutHandle createProcessSuccess p'
processChainOutput
toChain :: HostName -> Chroot -> Bool -> IO CmdLine