From 86783dc52d048418439019067a0a1afccd4829d1 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 2 Apr 2015 10:20:44 -0400 Subject: Make propellor resistent to changes to shared libraries, such as libffi * Make propellor resistent to changes to shared libraries, such as libffi, which might render the propellor binary unable to run. This is dealt with by checking the binary both when running propellor on a remote host, and by Cron.runPropellor. If the binary doesn't work, it will be rebuilt. * Note that since a new switch had to be added to allow testing the binary, upgrading to this version will cause a rebuild from scratch of propellor. --- src/Propellor/CmdLine.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src/Propellor/CmdLine.hs') diff --git a/src/Propellor/CmdLine.hs b/src/Propellor/CmdLine.hs index 9d7d0d95..1298daf2 100644 --- a/src/Propellor/CmdLine.hs +++ b/src/Propellor/CmdLine.hs @@ -33,6 +33,7 @@ usage h = hPutStrLn h $ unlines , " propellor --list-fields" , " propellor --merge" , " propellor --build" + , " propellor --check" ] usageError :: [String] -> IO a @@ -43,6 +44,7 @@ usageError ps = do processCmdLine :: IO CmdLine processCmdLine = go =<< getArgs where + go ("--check":_) = return Check go ("--spin":ps) = case reverse ps of (r:"--via":hs) -> Spin <$> mapM hostname (reverse hs) @@ -91,6 +93,7 @@ defaultMain hostlist = do where go _ (Serialized cmdline) = go True cmdline go _ (Continue cmdline) = go False cmdline + go _ Check = return () go _ (Set field context) = setPrivData field context go _ (Dump field context) = dumpPrivData field context go _ (Edit field context) = editPrivData field context -- cgit v1.2.3