From cc16366ff2998866fa3b222114cb989985b48359 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sun, 30 Mar 2014 21:01:18 -0400 Subject: propellor spin --- CmdLine.hs | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'CmdLine.hs') 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 -- cgit v1.2.3