summaryrefslogtreecommitdiff
path: root/src/Propellor
diff options
context:
space:
mode:
authorJoey Hess2014-11-22 15:11:24 -0400
committerJoey Hess2014-11-22 15:11:24 -0400
commit151aadd4e20c49d18eedadb08272fccd114de7c8 (patch)
tree326097dde1c91abaee157b72603c4615e62cbf92 /src/Propellor
parent99fc967ecab693870f5354d992b50822204bfc8e (diff)
propellor spin
Diffstat (limited to 'src/Propellor')
-rw-r--r--src/Propellor/CmdLine.hs9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs
index 3e64f035..bb9b470e 100644
--- a/src/Propellor/CmdLine.hs
+++ b/src/Propellor/CmdLine.hs
@@ -170,7 +170,7 @@ spin target relay hst = do
(proc "ssh" $ cacheparams ++ [user, updatecmd])
-- And now we can run it.
- unlessM (boolSystem "ssh" (map Param $ cacheparams ++ ["-t", user, runcmd])) $
+ unlessM (boolSystem "ssh" (map Param $ cacheparams ++ runparams)) $
error $ "remote propellor failed"
where
hn = fromMaybe target relay
@@ -200,4 +200,9 @@ spin target relay hst = do
cmd = if isNothing relay
then "--continue " ++ shellEscape (show (SimpleRun target))
else "--spin " ++ shellEscape target
-
+ runparams = catMaybes
+ [ if isJust relay then Just "-A" else Nothing
+ , Just "-t"
+ , Just user
+ , Just runcmd
+ ]