|
|
|
@ -31,11 +31,19 @@ state_should="$(cat "$__object/parameter/state")" |
|
|
|
|
|
|
|
|
|
# Correct pre 2.1 naming - FIXME in 2.1 |
|
|
|
|
case "$state_should" in |
|
|
|
|
installed) state_should="present" ;; |
|
|
|
|
removed) state_should="absent" ;; |
|
|
|
|
# FIXME: print warning to stderr! |
|
|
|
|
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 |
|
|
|
|
|
|
|
|
|
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 |
|
|
|
|
present*) |
|
|
|
|
name="$(echo "$state_is" | cut -d ' ' -f 2)" |
|
|
|
|