From 10d0cf00d66a66be937b5234f5073de12d34fa7c Mon Sep 17 00:00:00 2001 From: Steven Armstrong Date: Sat, 10 Mar 2012 14:07:13 +0100 Subject: [PATCH] /special/raw/ Signed-off-by: Steven Armstrong --- conf/type/__cron/man.text | 9 +++++---- conf/type/__cron/manifest | 6 +++--- conf/type/__cron/parameter/optional | 2 +- 3 files changed, 9 insertions(+), 8 deletions(-) diff --git a/conf/type/__cron/man.text b/conf/type/__cron/man.text index 2e3ae925..039be04c 100644 --- a/conf/type/__cron/man.text +++ b/conf/type/__cron/man.text @@ -35,9 +35,10 @@ month:: See crontab(5). Defaults to * day_of_week:: See crontab(5). Defaults to * -special:: - See EXTENSIONS in crontab(5). e.g. reboot, yearly, monthly - If given all other time and date fields are ignored. +raw:: + Take whatever the user has given instead of time and date fields. + If given, all other time and date fields are ignored. + Can for example be used to specify cron EXTENSIONS like reboot, yearly etc. EXAMPLES @@ -50,7 +51,7 @@ __cron some-id --user root --command "/path/to/script" \ # run on reboot __cron some-id --user root --command "/path/to/script" \ - --special reboot + --raw @reboot # remove cronjob __cron some-id --user root --command "/path/to/script" --state absent diff --git a/conf/type/__cron/manifest b/conf/type/__cron/manifest index e8a77229..7aca41ff 100755 --- a/conf/type/__cron/manifest +++ b/conf/type/__cron/manifest @@ -25,9 +25,9 @@ command="$(cat "$__object/parameter/command")" # set defaults test -f "$__object/parameter/state" || echo "present" > "$__object/parameter/state" -if [ -f "$__object/parameter/special" ]; then - special="$(cat "$__object/parameter/special")" - entry="@$special $command" +if [ -f "$__object/parameter/raw" ]; then + raw="$(cat "$__object/parameter/raw")" + entry="$raw $command" else minute="$(cat "$__object/parameter/minute" 2>/dev/null || echo "*")" hour="$(cat "$__object/parameter/hour" 2>/dev/null || echo "*")" diff --git a/conf/type/__cron/parameter/optional b/conf/type/__cron/parameter/optional index e81b64c3..517d821e 100644 --- a/conf/type/__cron/parameter/optional +++ b/conf/type/__cron/parameter/optional @@ -4,4 +4,4 @@ hour day_of_month month day_of_week -special +raw