diff options
| author | Joey Hess <joey@kitenet.net> | 2014-04-01 13:51:58 -0400 |
|---|---|---|
| committer | Joey Hess <joey@kitenet.net> | 2014-04-01 13:51:58 -0400 |
| commit | 79cbdf35b1188d83e64a713efa82bc7a0a72a181 (patch) | |
| tree | 4ad96d9fa0d2e61f6cd15a2b635fef67ea7c9bb1 /Propellor/CmdLine.hs | |
| parent | 2c328ad142421302b41bc961aa175f60e27f0ab3 (diff) | |
better method of starting propellor simplesh inside docker
Diffstat (limited to 'Propellor/CmdLine.hs')
| -rw-r--r-- | Propellor/CmdLine.hs | 19 |
1 files changed, 2 insertions, 17 deletions
diff --git a/Propellor/CmdLine.hs b/Propellor/CmdLine.hs index 8edfe19e..73254165 100644 --- a/Propellor/CmdLine.hs +++ b/Propellor/CmdLine.hs @@ -9,21 +9,10 @@ import System.Log.Handler (setFormatter, LogHandler) import System.Log.Handler.Simple import Propellor -import Propellor.SimpleSh +import qualified Propellor.Property.Docker as Docker import Utility.FileMode import Utility.SafeCommand -data CmdLine - = Run HostName - | Spin HostName - | Boot HostName - | Set HostName PrivDataField - | AddKey String - | Continue CmdLine - | SimpleSh FilePath - | Chain HostName - deriving (Read, Show, Eq) - usage :: IO a usage = do putStrLn $ unlines @@ -49,7 +38,6 @@ processCmdLine = go =<< getArgs go ("--continue":s:[]) = case readish s of Just cmdline -> return $ Continue cmdline Nothing -> errorMessage "--continue serialization failure" - go ("--simplesh":f:[]) = return $ SimpleSh f go ("--chain":h:[]) = return $ Chain h go (h:[]) | "--" `isPrefixOf` h = usage @@ -71,8 +59,8 @@ defaultMain getprops = do go _ (Continue cmdline) = go False cmdline 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 _ (ChainDocker host) = Docker.chain host 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 @@ -296,9 +284,6 @@ keyring = privDataDir </> "keyring.gpg" gpgopts :: [String] gpgopts = ["--options", "/dev/null", "--no-default-keyring", "--keyring", keyring] -localdir :: FilePath -localdir = "/usr/local/propellor" - getUrl :: IO String getUrl = maybe nourl return =<< getM get urls where |
