forked from ungleich-public/cdist
warn about deprecated usage
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
parent
8e5a0f83c5
commit
52849b91c5
1 changed files with 11 additions and 3 deletions
|
@ -31,11 +31,19 @@ state_should="$(cat "$__object/parameter/state")"
|
||||||
|
|
||||||
# Correct pre 2.1 naming - FIXME in 2.1
|
# Correct pre 2.1 naming - FIXME in 2.1
|
||||||
case "$state_should" in
|
case "$state_should" in
|
||||||
installed) state_should="present" ;;
|
# FIXME: print warning to stderr!
|
||||||
removed) state_should="absent" ;;
|
installed)
|
||||||
|
echo "WARNING: $state_should is deprecated, please change to present/absent (will be removed in cdist 2.1)" >&2
|
||||||
|
state_should="present"
|
||||||
|
;;
|
||||||
|
removed)
|
||||||
|
echo "WARNING: $state_should is deprecated, please change to present/absent (will be removed in cdist 2.1)" >&2
|
||||||
|
state_should="absent"
|
||||||
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
state_is="$(cat "$__object/explorer/pkg_status")"
|
# FIXME: use grep directly, state is a list, not a line!
|
||||||
|
state_is="$(cat "$__object/explorer/state")"
|
||||||
case "$state_is" in
|
case "$state_is" in
|
||||||
present*)
|
present*)
|
||||||
name="$(echo "$state_is" | cut -d ' ' -f 2)"
|
name="$(echo "$state_is" | cut -d ' ' -f 2)"
|
||||||
|
|
Loading…
Reference in a new issue