avoid renaming --boot to --sync
That broke updating existing systems, since --boot is what makes the remote propellor update itself. The hostname is no longer needed by --boot for new propellor's, but is still passed for old ones. Note that there will be a double run of propellor when upgrading via --spin, because it now runs --boot followed by --spin on the remote host, and the old --boot also satisfied all properties.
This commit is contained in:
parent
deb763d8e8
commit
8ea43c6302
|
@ -41,7 +41,7 @@ processCmdLine = go =<< getArgs
|
||||||
where
|
where
|
||||||
go ("--help":_) = usage
|
go ("--help":_) = usage
|
||||||
go ("--spin":h:[]) = return $ Spin h
|
go ("--spin":h:[]) = return $ Spin h
|
||||||
go ("--sync":[]) = return $ Sync
|
go ("--boot":h:[]) = return $ Boot h
|
||||||
go ("--add-key":k:[]) = return $ AddKey k
|
go ("--add-key":k:[]) = return $ AddKey k
|
||||||
go ("--set":f:c:[]) = withprivfield f c Set
|
go ("--set":f:c:[]) = withprivfield f c Set
|
||||||
go ("--dump":f:c:[]) = withprivfield f c Dump
|
go ("--dump":f:c:[]) = withprivfield f c Dump
|
||||||
|
@ -91,7 +91,7 @@ defaultMain hostlist = do
|
||||||
( onlyProcess $ withhost hn mainProperties
|
( onlyProcess $ withhost hn mainProperties
|
||||||
, go True (Spin hn)
|
, go True (Spin hn)
|
||||||
)
|
)
|
||||||
go False Sync = onlyProcess sync
|
go False (Boot _) = onlyProcess sync
|
||||||
|
|
||||||
withhost :: HostName -> (Host -> IO ()) -> IO ()
|
withhost :: HostName -> (Host -> IO ()) -> IO ()
|
||||||
withhost hn a = maybe (unknownhost hn hostlist) a (findHost hostlist hn)
|
withhost hn a = maybe (unknownhost hn hostlist) a (findHost hostlist hn)
|
||||||
|
@ -223,7 +223,7 @@ spin hn hst = do
|
||||||
, "else " ++ intercalate " && "
|
, "else " ++ intercalate " && "
|
||||||
[ "cd " ++ localdir
|
[ "cd " ++ localdir
|
||||||
, "if ! test -x ./propellor; then make deps build; fi"
|
, "if ! test -x ./propellor; then make deps build; fi"
|
||||||
, "./propellor --sync"
|
, "./propellor --boot " ++ hn
|
||||||
]
|
]
|
||||||
, "fi"
|
, "fi"
|
||||||
]
|
]
|
||||||
|
|
|
@ -144,6 +144,6 @@ data CmdLine
|
||||||
| AddKey String
|
| AddKey String
|
||||||
| Continue CmdLine
|
| Continue CmdLine
|
||||||
| Chain HostName
|
| Chain HostName
|
||||||
| Sync
|
| Boot HostName
|
||||||
| Docker HostName
|
| Docker HostName
|
||||||
deriving (Read, Show, Eq)
|
deriving (Read, Show, Eq)
|
||||||
|
|
Loading…
Reference in New Issue