Add shebang to cron.daily etc files.

This commit is contained in:
Joey Hess 2015-02-25 14:58:40 -04:00
parent 5b56a416c1
commit fa7656f743
2 changed files with 5 additions and 1 deletions

1
debian/changelog vendored
View File

@ -2,6 +2,7 @@ propellor (2.1.1) UNRELEASED; urgency=medium
* When running shimmed (eg in a docker container), * When running shimmed (eg in a docker container),
improve process name visible in ps. improve process name visible in ps.
* Add shebang to cron.daily etc files.
-- Joey Hess <id@joeyh.name> Mon, 16 Feb 2015 19:00:48 -0400 -- Joey Hess <id@joeyh.name> Mon, 16 Feb 2015 19:00:48 -0400

View File

@ -30,7 +30,10 @@ data Times
job :: Desc -> Times -> UserName -> FilePath -> String -> Property NoInfo job :: Desc -> Times -> UserName -> FilePath -> String -> Property NoInfo
job desc times user cddir command = combineProperties ("cronned " ++ desc) job desc times user cddir command = combineProperties ("cronned " ++ desc)
[ cronjobfile `File.hasContent` [ cronjobfile `File.hasContent`
[ "# Generated by propellor" [ case times of
Times _ -> ""
_ -> "#!/bin/sh\nset -e"
, "# Generated by propellor"
, "" , ""
, "SHELL=/bin/sh" , "SHELL=/bin/sh"
, "PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin" , "PATH=/usr/local/sbin:/usr/local/bin:/sbin:/bin:/usr/sbin:/usr/bin"