summaryrefslogtreecommitdiff
path: root/src/Propellor/CmdLine.hs
diff options
context:
space:
mode:
authorJoey Hess2014-11-18 19:36:30 -0400
committerJoey Hess2014-11-18 19:36:30 -0400
commitc9fed0fdaa103e091fdee4ab4ab94dd921ce174a (patch)
treea13951b56d3a3337c2b2ba53ca8d02891166ab47 /src/Propellor/CmdLine.hs
parent65d3f085dcd86c53549a3b126e0888f09c5e1925 (diff)
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?
Diffstat (limited to 'src/Propellor/CmdLine.hs')
-rw-r--r--src/Propellor/CmdLine.hs16
1 files changed, 8 insertions, 8 deletions
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 $