From e4e2f44392f8509f38606eacc8bf827c405a46a9 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 18 Nov 2014 01:25:54 -0400 Subject: propellor spin --- src/Propellor/CmdLine.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs index f3cf2f91..a4e45981 100644 --- a/src/Propellor/CmdLine.hs +++ b/src/Propellor/CmdLine.hs @@ -42,6 +42,7 @@ processCmdLine = go =<< getArgs go ("--help":_) = usage go ("--spin":h:[]) = return $ Spin h go ("--boot":h:[]) = return $ Boot h + go ("--run":h:[]) = return $ Run h go ("--add-key":k:[]) = return $ AddKey k go ("--set":f:c:[]) = withprivfield f c Set go ("--dump":f:c:[]) = withprivfield f c Dump @@ -186,8 +187,8 @@ spin hn hst = do void $ boolSystem "git" [Param "push"] cacheparams <- toCommand <$> sshCachingParams hn go cacheparams url =<< hostprivdata - unlessM (boolSystem "ssh" (map Param (cacheparams ++ ["-t", user, spincmd]))) $ - error $ "remote propellor failed (running: " ++ spincmd ++")" + unlessM (boolSystem "ssh" (map Param (cacheparams ++ ["-t", user, runcmd]))) $ + error $ "remote propellor failed (running: " ++ runcmd ++")" where hostprivdata = show . filterPrivData hst <$> decryptPrivData @@ -228,8 +229,8 @@ spin hn hst = do , "fi" ] - spincmd = mkcmd - [ "cd " ++ localdir ++ " && ./propellor --continue " ++ shellEscape (show (Chain hn)) ] + runcmd = mkcmd + [ "cd " ++ localdir ++ " && ./propellor --run " ++ hn ] getstatus :: Handle -> IO BootStrapStatus getstatus h = do -- cgit v1.2.3