forked from ungleich-public/cdist
Add check for the state parameter in manifest.
This only allow following cases: - present - absent else, it will abort with an error message.
This commit is contained in:
parent
e5d86ffc93
commit
a761d4842c
1 changed files with 9 additions and 0 deletions
|
@ -22,3 +22,12 @@ if [ -f "$__object/parameter/raw" ] && [ -f "$__object/parameter/raw_command" ];
|
|||
echo "ERROR: both raw and raw_command specified" >&2
|
||||
exit 1
|
||||
fi
|
||||
|
||||
case "$(cat "$__object/parameter/state" 2>/dev/null || echo "present")" in
|
||||
present) ;;
|
||||
absent) ;;
|
||||
|
||||
*)
|
||||
echo "ERROR: unkown cron state" >&2
|
||||
exit 2
|
||||
esac
|
||||
|
|
Loading…
Reference in a new issue