From 1d4994b11726b327abf09d9246c5c932c04f3ace Mon Sep 17 00:00:00 2001 From: Dennis Camera Date: Thu, 18 Sep 2025 07:59:19 +0200 Subject: [PATCH] [type/__cron] Remove deprecated parameters The --raw_command, --day_of_month, --day_of_week have been deprecated for more than three years. --- type/__cron/gencode-remote | 22 +++---------------- type/__cron/parameter/boolean | 1 - type/__cron/parameter/deprecated/day_of_month | 1 - type/__cron/parameter/deprecated/day_of_week | 1 - type/__cron/parameter/deprecated/raw_command | 1 - type/__cron/parameter/optional | 2 -- 6 files changed, 3 insertions(+), 25 deletions(-) delete mode 100644 type/__cron/parameter/boolean delete mode 100644 type/__cron/parameter/deprecated/day_of_month delete mode 100644 type/__cron/parameter/deprecated/day_of_week delete mode 100644 type/__cron/parameter/deprecated/raw_command diff --git a/type/__cron/gencode-remote b/type/__cron/gencode-remote index 24fffbbbf..3f9df7ffa 100755 --- a/type/__cron/gencode-remote +++ b/type/__cron/gencode-remote @@ -35,31 +35,15 @@ name=${__object_name:?} user=$(cat "${__object:?}/parameter/user") command=$(cat "${__object:?}/parameter/command") -if test -f "${__object:?}/parameter/raw_command" -then - echo 'error: parameter --raw_command is not supported anymore.' >&2 - exit 1 -elif test -f "${__object:?}/parameter/raw" +if test -f "${__object:?}/parameter/raw" then read -r when <"${__object:?}/parameter/raw" else read -r minute <"${__object:?}/parameter/minute" read -r hour <"${__object:?}/parameter/hour" - if test -f "${__object:?}/parameter/day_of_month" - then - # deprecated name - read -r day_of_month <"${__object:?}/parameter/day_of_month" - else - read -r day_of_month <"${__object:?}/parameter/day-of-month" - fi + read -r day_of_month <"${__object:?}/parameter/day-of-month" read -r month <"${__object:?}/parameter/month" - if test -f "${__object:?}/parameter/day_of_week" - then - # deprecated name - read -r day_of_week <"${__object:?}/parameter/day_of_week" - else - read -r day_of_week <"${__object:?}/parameter/day-of-week" - fi + read -r day_of_week <"${__object:?}/parameter/day-of-week" when="${minute} ${hour} ${day_of_month} ${month} ${day_of_week}" fi diff --git a/type/__cron/parameter/boolean b/type/__cron/parameter/boolean deleted file mode 100644 index 54cfb0b3b..000000000 --- a/type/__cron/parameter/boolean +++ /dev/null @@ -1 +0,0 @@ -raw_command diff --git a/type/__cron/parameter/deprecated/day_of_month b/type/__cron/parameter/deprecated/day_of_month deleted file mode 100644 index 0677455ca..000000000 --- a/type/__cron/parameter/deprecated/day_of_month +++ /dev/null @@ -1 +0,0 @@ -use --day-of-week instead diff --git a/type/__cron/parameter/deprecated/day_of_week b/type/__cron/parameter/deprecated/day_of_week deleted file mode 100644 index 0677455ca..000000000 --- a/type/__cron/parameter/deprecated/day_of_week +++ /dev/null @@ -1 +0,0 @@ -use --day-of-week instead diff --git a/type/__cron/parameter/deprecated/raw_command b/type/__cron/parameter/deprecated/raw_command deleted file mode 100644 index 08d7f35fc..000000000 --- a/type/__cron/parameter/deprecated/raw_command +++ /dev/null @@ -1 +0,0 @@ -use cdist-type__cron_env(7) instead diff --git a/type/__cron/parameter/optional b/type/__cron/parameter/optional index 0b4cb31df..23bb0dff1 100644 --- a/type/__cron/parameter/optional +++ b/type/__cron/parameter/optional @@ -1,9 +1,7 @@ state minute hour -day_of_month day-of-month month -day_of_week day-of-week raw