diff options
| author | Joey Hess <joey@kitenet.net> | 2014-06-19 14:41:55 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-06-19 14:41:55 -0400 |
| commit | 9372ecc6c6e3c2bb50d578cf7fe50bc7b54de8b5 (patch) | |
| tree | 5afafb3bed4bd5be83fda3df829db3ca53334000 /src/Propellor/CmdLine.hs | |
| parent | e3b53bf28996ad5eee96c1ca9f9ef39a7d10b358 (diff) | |
propellor spin
Diffstat (limited to 'src/Propellor/CmdLine.hs')
| -rw-r--r-- | src/Propellor/CmdLine.hs | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs index 32e97316..c084355b 100644 --- a/src/Propellor/CmdLine.hs +++ b/src/Propellor/CmdLine.hs @@ -26,9 +26,10 @@ usage = do , " propellor" , " propellor hostname" , " propellor --spin hostname" + , " propellor --add-key keyid" , " propellor --set hostname field" , " propellor --dump hostname field" - , " propellor --add-key keyid" + , " propellor --edit hostname field" ] exitFailure @@ -41,6 +42,7 @@ processCmdLine = go =<< getArgs go ("--add-key":k:[]) = return $ AddKey k go ("--set":h:f:[]) = withprivfield f (return . Set h) go ("--dump":h:f:[]) = withprivfield f (return . Dump h) + go ("--edit":h:f:[]) = withprivfield f (return . Edit h) go ("--continue":s:[]) = case readish s of Just cmdline -> return $ Continue cmdline Nothing -> errorMessage "--continue serialization failure" @@ -71,6 +73,7 @@ defaultMain hostlist = do go _ (Continue cmdline) = go False cmdline go _ (Set hn field) = setPrivData hn field go _ (Dump hn field) = dumpPrivData hn field + go _ (Edit hn field) = editPrivData hn field go _ (AddKey keyid) = addKey keyid go _ (Chain hn) = withhost hn $ \h -> do r <- runPropellor h $ ensureProperties $ hostProperties h |
