From bf4ba055287f46d6e125d8fd7870dd981d224fc8 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 1 Apr 2014 03:48:45 -0400 Subject: docker support is working in theory (but untested) --- Propellor/CmdLine.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Propellor/CmdLine.hs') diff --git a/Propellor/CmdLine.hs b/Propellor/CmdLine.hs index 05df86bf..62f86e63 100644 --- a/Propellor/CmdLine.hs +++ b/Propellor/CmdLine.hs @@ -17,6 +17,7 @@ data CmdLine | AddKey String | Continue CmdLine | SimpleSh FilePath + | Chain HostName deriving (Read, Show, Eq) usage :: IO a @@ -45,6 +46,7 @@ processCmdLine = go =<< getArgs Just cmdline -> return $ Continue cmdline Nothing -> errorMessage "--continue serialization failure" go ("--simplesh":f:[]) = return $ SimpleSh f + go ("--chain":h:[]) = return $ Chain h go (h:[]) = return $ Run h go [] = do s <- takeWhile (/= '\n') <$> readProcess "hostname" ["-f"] @@ -60,6 +62,7 @@ defaultMain getprops = go True =<< processCmdLine go _ (Set host field) = setPrivData host field go _ (AddKey keyid) = addKey keyid go _ (SimpleSh f) = simpleSh f + go _ (Chain host) = withprops host $ print <=< ensureProperties' go True cmdline@(Spin _) = buildFirst cmdline $ go False cmdline go True cmdline = updateFirst cmdline $ go False cmdline go False (Spin host) = withprops host $ const $ spin host -- cgit v1.3-2-g0d8e