summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorJoey Hess2015-01-01 17:09:21 -0400
committerJoey Hess2015-01-01 17:13:03 -0400
commit7cbd367e1ce6079efe1add4cc3baec3ffc0b5b49 (patch)
tree370bb2f73b58a6b5443bb17a0c690325bb9329ab /src
parent138629941da64fb471850fda72e3b2c88e7fa88f (diff)
Update intermediary propellor in --spin --via
Diffstat (limited to 'src')
-rw-r--r--src/Propellor/CmdLine.hs4
-rw-r--r--src/Propellor/Spin.hs2
-rw-r--r--src/Propellor/Types.hs1
3 files changed, 4 insertions, 3 deletions
diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs
index 3e375c7e..378367e8 100644
--- a/src/Propellor/CmdLine.hs
+++ b/src/Propellor/CmdLine.hs
@@ -54,7 +54,6 @@ processCmdLine = go =<< getArgs
go ("--help":_) = do
usage stdout
exitFailure
- go ("--update":_:[]) = return $ Update Nothing
go ("--boot":_:[]) = return $ Update Nothing -- for back-compat
go ("--serialized":s:[]) = serialized Serialized s
go ("--continue":s:[]) = serialized Continue s
@@ -98,8 +97,9 @@ defaultMain hostlist = do
go _ (DockerChain hn cid) = Docker.chain hostlist hn cid
go _ (DockerInit hn) = Docker.init hn
go _ (GitPush fin fout) = gitPushHelper fin fout
+ go _ (Relay h) = forceConsole >> updateFirst (Update (Just h)) (update (Just h))
go _ (Update Nothing) = forceConsole >> fetchFirst (onlyprocess (update Nothing))
- go _ (Update (Just h)) = forceConsole >> fetchFirst (update (Just h))
+ go _ (Update (Just h)) = update (Just h)
go _ Merge = mergeSpin
go True cmdline@(Spin _ _) = buildFirst cmdline $ go False cmdline
go True cmdline = updateFirst cmdline $ go False cmdline
diff --git a/src/Propellor/Spin.hs b/src/Propellor/Spin.hs
index 14275957..a1035387 100644
--- a/src/Propellor/Spin.hs
+++ b/src/Propellor/Spin.hs
@@ -80,7 +80,7 @@ spin target relay hst = do
, "if ! test -x ./propellor; then make deps build; fi"
, if viarelay
then "./propellor --continue " ++
- shellEscape (show (Update (Just target)))
+ shellEscape (show (Relay target))
-- Still using --boot for back-compat...
else "./propellor --boot " ++ target
]
diff --git a/src/Propellor/Types.hs b/src/Propellor/Types.hs
index 63abd226..fc10cb20 100644
--- a/src/Propellor/Types.hs
+++ b/src/Propellor/Types.hs
@@ -165,6 +165,7 @@ data CmdLine
| Serialized CmdLine
| Continue CmdLine
| Update (Maybe HostName)
+ | Relay HostName
| DockerInit HostName
| DockerChain HostName String
| ChrootChain HostName FilePath Bool Bool