summaryrefslogtreecommitdiff
path: root/src/Propellor/CmdLine.hs
diff options
context:
space:
mode:
Diffstat (limited to 'src/Propellor/CmdLine.hs')
-rw-r--r--src/Propellor/CmdLine.hs8
1 files changed, 6 insertions, 2 deletions
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