From 4a7b19ea49923de05aca639816d27dc184cdb25a Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Mon, 7 Mar 2016 17:05:25 -0400 Subject: make Cron.runPropellor pass System to bootstrapPropellorCommand Rather than having the property fail when the Host has no OS defined, I made bootstrapPropellorCommand not install deps in this situation. The cron job will (probably) still work, unless a system upgrade causes deps to be removed. --- src/Propellor/Property/Cron.hs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/Propellor/Property') diff --git a/src/Propellor/Property/Cron.hs b/src/Propellor/Property/Cron.hs index a6ab3eca..365e2903 100644 --- a/src/Propellor/Property/Cron.hs +++ b/src/Propellor/Property/Cron.hs @@ -81,5 +81,7 @@ niceJob desc times user cddir command = job desc times user cddir -- | Installs a cron job to run propellor. runPropellor :: Times -> Property NoInfo -runPropellor times = niceJob "propellor" times (User "root") localdir "true" --- (bootstrapPropellorCommand ++ "; ./propellor") +runPropellor times = withOS "propellor cron job" $ \o -> + ensureProperty $ + niceJob "propellor" times (User "root") localdir + (bootstrapPropellorCommand o ++ "; ./propellor") -- cgit v1.2.3