From f18304181f59f737f8034f6a5aa69b89829f1785 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Fri, 16 Oct 2015 19:49:49 -0400 Subject: Added --unset-unused --- src/Propellor/CmdLine.hs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/Propellor/CmdLine.hs') diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs index 35929ea7..1225f411 100644 --- a/src/Propellor/CmdLine.hs +++ b/src/Propellor/CmdLine.hs @@ -27,10 +27,12 @@ usage h = hPutStrLn h $ unlines , " propellor --spin targethost [--via relayhost]" , " propellor --add-key keyid" , " propellor --rm-key keyid" - , " propellor --set field context" + , " propellor --list-fields" , " propellor --dump field context" , " propellor --edit field context" - , " propellor --list-fields" + , " propellor --set field context" + , " propellor --unset field context" + , " propellor --unset-unused" , " propellor --merge" , " propellor --build" , " propellor --check" @@ -54,6 +56,7 @@ processCmdLine = go =<< getArgs go ("--rm-key":k:[]) = return $ RmKey k go ("--set":f:c:[]) = withprivfield f c Set go ("--unset":f:c:[]) = withprivfield f c Unset + go ("--unset-unused":[]) = return UnsetUnused go ("--dump":f:c:[]) = withprivfield f c Dump go ("--edit":f:c:[]) = withprivfield f c Edit go ("--list-fields":[]) = return ListFields @@ -98,6 +101,7 @@ defaultMain hostlist = do go _ Check = return () go _ (Set field context) = setPrivData field context go _ (Unset field context) = unsetPrivData field context + go _ (UnsetUnused) = unsetPrivDataUnused hostlist go _ (Dump field context) = dumpPrivData field context go _ (Edit field context) = editPrivData field context go _ ListFields = listPrivDataFields hostlist -- cgit v1.2.3