summaryrefslogtreecommitdiff
path: root/CmdLine.hs
diff options
context:
space:
mode:
authorJoey Hess2014-03-30 21:01:18 -0400
committerJoey Hess2014-03-30 21:01:18 -0400
commitcc16366ff2998866fa3b222114cb989985b48359 (patch)
tree93fae5039b1b723723a8bcea32aeed7821c1d956 /CmdLine.hs
parent409cb20373f65c784f1430322b5f28bc58d34943 (diff)
propellor spin
Diffstat (limited to 'CmdLine.hs')
-rw-r--r--CmdLine.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/CmdLine.hs b/CmdLine.hs
index 144e22a8..a4ef3bae 100644
--- a/CmdLine.hs
+++ b/CmdLine.hs
@@ -11,7 +11,7 @@ data CmdLine
= Run HostName
| Spin HostName
| Boot HostName
- | Set HostName PrivDataField String
+ | Set HostName PrivDataField
processCmdLine :: IO CmdLine
processCmdLine = go =<< getArgs
@@ -19,8 +19,8 @@ processCmdLine = go =<< getArgs
go ("--help":_) = usage
go ("--spin":h:[]) = return $ Spin h
go ("--boot":h:[]) = return $ Boot h
- go ("--set":h:f:v:[]) = case readish f of
- Just pf -> return $ Set h pf v
+ go ("--set":h:f:[]) = case readish f of
+ Just pf -> return $ Set h pf
Nothing -> error $ "Unknown privdata field " ++ f
go (h:[]) = return $ Run h
go [] = do
@@ -37,7 +37,7 @@ usage = do
, " propellor"
, " propellor hostname"
, " propellor --spin hostname"
- , " propellor --set hostname field value"
+ , " propellor --set hostname field"
]
exitFailure
@@ -47,7 +47,7 @@ defaultMain getprops = go =<< processCmdLine
go (Run host) = ensureProperties (getprops host)
go (Spin host) = spin host
go (Boot host) = boot (getprops host)
- go (Set host field val) = setPrivData host field val
+ go (Set host field) = setPrivData host field
spin :: HostName -> IO ()
spin host = do