Commit Graph

29 Commits

Author SHA1 Message Date
matze 5e6e17b3e5 Moved default parameter values from scripts to cdist parameter handling.
For more generalisation, the default parameter values are now handled by
cdist instead of trying to get a value and use a default if parameter is
not given.

It handles the default values in a more general way, instead of write
one default in (possibly) multiple places.
Problem occurred when checking the 'state' parameter, which required to
set a default value in two places.
2020-02-15 09:46:23 +01:00
matze a761d4842c Add check for the state parameter in manifest.
This only allow following cases:
  - present
  - absent
else, it will abort with an error message.
2020-02-15 08:21:24 +01:00
matze e5d86ffc93 Fix to remove cronjobs when the cronjob expression did not match. 2020-02-01 17:08:25 +01:00
Darko Poljak e9b823bc39 Better fixes. 2018-10-07 10:22:11 +02:00
Darko Poljak a9f27beb98 Fix SC1117. 2018-10-07 10:22:11 +02:00
Jonas Weber ae7ccc5995 Fix SC2086 on all scripts
Relevant documentation: https://github.com/koalaman/shellcheck/wiki/SC2086

relates to: #540

This commit addresses 241 separate cases of missing quotes around
variables.
2018-10-04 19:45:22 +02:00
Darko Poljak 62378dc8b9 Change shebang to #!/bin/sh -e 2017-06-28 13:19:32 +02:00
Darko Poljak 9312bcb6b0 chmod +x *manifest *gencode-* 2017-06-28 12:52:10 +02:00
Daniel Heule 0ad767fa29 fix filter for new cron on sles12 sp2 2017-01-11 16:44:17 +01:00
Darko Poljak 0462b4afc9 Merge pull request #348 from dheule/bugfix_type__cron
bugfix of raw_command
2016-12-14 09:04:54 +01:00
Darko Poljak df566f4ff8 GPLv3+ relicensing. 2016-08-10 18:15:54 +02:00
Darko Poljak 0dfb4aee73 sphinx> ':manpage:' -> ':strong:' 2016-06-30 15:13:33 +02:00
Darko Poljak f98208f250 Make man pages SEE ALSO by convention. Improve docs building. 2016-06-30 12:09:07 +02:00
Darko Poljak 51c94e9e82 Restructure and fix and improve docs and manpages. 2016-06-29 07:48:34 +02:00
Darko Poljak b89077f9a5 Better sphinx manpage ext. Add custom dotman Makefile target for custom .cdist directory. 2016-06-23 16:08:59 +02:00
Darko Poljak cf32b669ff Write sphinx rst docs. 2016-05-22 17:16:03 +02:00
Darko Poljak 8a079b3440 Fix spelling errors - Bogatov's patch. 2016-05-05 09:58:35 +02:00
Daniel Heule 1e582dceec bugfix of raw_command
with raw_command, you can set env variables in crontab,
but cron don't accept env vars if the definition is
like this:
SHELL=/bin/bash # marker of something ...
so we need to make sure that raw commands are not apended by a marker
2014-07-23 09:22:03 +02:00
Daniel Heule 5a114cf6ae __cron should replace entrys with his id, try 2 2014-01-14 10:11:33 +01:00
Daniel Heule 6afc4b82c2 __cron should replace entrys with his id 2014-01-14 09:47:54 +01:00
Daniel Heule c50925cab5 bugfix in __cron type, was a wrong quoting 2013-12-19 14:45:55 +01:00
Daniel Heule e6420a49e8 verhindern dass raw and raw_command zusammen angegeben werden 2013-12-09 11:39:44 +01:00
Daniel Heule 02aad6f4cc revert vom chmod der aus versehen geändert wurde ... 2013-12-09 09:57:31 +01:00
Daniel Heule c0da6fcc89 Verbesserungen am __cron type
1. Filter messages from crontab -l welche das ganze file füllen
2. neuer parameter raw_command, um globale variablen zu setzen ...
2013-12-09 09:44:40 +01:00
Nico Schottelius 4ae241259f remove the old entries on change
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-20 09:20:14 +02:00
Nico Schottelius 1c94c615b1 __cron: remove parameter changing code, remove multiline code, remove early execution of included $() code, simplify __cron
Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
2013-06-19 10:55:07 +02:00
Steven Armstrong d72afd3903 dont change parameters; dont use tmpfile; update copyright
Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
2013-05-10 12:35:22 +02:00
Arkaitz Jimenez d59953642e crontab -l should be allowed to fail with "no crontab" without stopping exec 2013-04-01 00:01:22 +02:00
Nico Schottelius 63573a9797 make package_data work
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
2012-10-29 22:50:27 +01:00