From c9fed0fdaa103e091fdee4ab4ab94dd921ce174a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 18 Nov 2014 19:36:30 -0400 Subject: add --update, which will one day replace --boot But no time soon, since that would break --spin to old versions of propellor Maybe after 1 year? --- src/Propellor/CmdLine.hs | 16 ++++++++-------- src/Propellor/Types.hs | 2 +- 2 files changed, 9 insertions(+), 9 deletions(-) (limited to 'src/Propellor') diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs index 66da6339..6c3920ce 100644 --- a/src/Propellor/CmdLine.hs +++ b/src/Propellor/CmdLine.hs @@ -41,7 +41,8 @@ processCmdLine = go =<< getArgs where go ("--help":_) = usage go ("--spin":h:[]) = return $ Spin h - go ("--boot":h:[]) = return $ Boot h + go ("--update":h:[]) = return $ Update h + go ("--boot":h:[]) = return $ Update h -- for back-compat go ("--run":h:[]) = return $ Run h go ("--add-key":k:[]) = return $ AddKey k go ("--set":f:c:[]) = withprivfield f c Set @@ -94,9 +95,9 @@ defaultMain hostlist = do ( onlyProcess $ withhost hn mainProperties , go True (Spin hn) ) - go False (Boot _) = do + go False (Update _) = do forceConsole - onlyProcess boot + onlyProcess update withhost :: HostName -> (Host -> IO ()) -> IO () withhost hn a = maybe (unknownhost hn hostlist) a (findHost hostlist hn) @@ -282,11 +283,10 @@ sendGitClone hn = void $ actionMessage ("Cloning git repository to " ++ hn) $ do , "rm -f " ++ remotebundle ] --- Called "boot" for historical reasons, but what this really does is --- update the privdata, repo url, and git repo over the ssh connection from the --- client that ran propellor --spin. -boot :: IO () -boot = do +-- Update the privdata, repo url, and git repo over the ssh +-- connection from the client that ran propellor --spin. +update :: IO () +update = do req NeedRepoUrl repoUrlMarker setRepoUrl makePrivDataDir req NeedPrivData privDataMarker $ diff --git a/src/Propellor/Types.hs b/src/Propellor/Types.hs index e0a71130..a1d25b4f 100644 --- a/src/Propellor/Types.hs +++ b/src/Propellor/Types.hs @@ -146,7 +146,7 @@ data CmdLine | AddKey String | Continue CmdLine | Chain HostName Bool - | Boot HostName + | Update HostName | Docker HostName | GitPush Fd Fd deriving (Read, Show, Eq) -- cgit v1.2.3