forked from ungleich-public/cdist
allow failing cat on optional parameter
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
parent
748fc8a258
commit
8c0228bbaa
2 changed files with 3 additions and 2 deletions
|
@ -23,7 +23,7 @@ ruby="$(echo "$gemset" | cut -d '@' -f 1)"
|
||||||
gemsetname="$(echo "$gemset" | cut -d '@' -f 2)"
|
gemsetname="$(echo "$gemset" | cut -d '@' -f 2)"
|
||||||
state_is="$(cat "$__object/explorer/state")"
|
state_is="$(cat "$__object/explorer/state")"
|
||||||
user="$(cat "$__object/parameter/user")"
|
user="$(cat "$__object/parameter/user")"
|
||||||
default="$(cat "$__object/parameter/default")"
|
default="$(cat "$__object/parameter/default" 2>/dev/null || true)"
|
||||||
state_should="$(cat "$__object/parameter/state")"
|
state_should="$(cat "$__object/parameter/state")"
|
||||||
if [ "$state_is" != "$state_should" ]; then
|
if [ "$state_is" != "$state_should" ]; then
|
||||||
case "$state_should" in
|
case "$state_should" in
|
||||||
|
|
|
@ -21,8 +21,9 @@
|
||||||
ruby="$__object_id"
|
ruby="$__object_id"
|
||||||
state_is="$(cat "$__object/explorer/state")"
|
state_is="$(cat "$__object/explorer/state")"
|
||||||
user="$(cat "$__object/parameter/user")"
|
user="$(cat "$__object/parameter/user")"
|
||||||
default="$(cat "$__object/parameter/default")"
|
default="$(cat "$__object/parameter/default" 2>/dev/null || true)"
|
||||||
state_should="$(cat "$__object/parameter/state")"
|
state_should="$(cat "$__object/parameter/state")"
|
||||||
|
|
||||||
if [ "$state_is" != "$state_should" ]; then
|
if [ "$state_is" != "$state_should" ]; then
|
||||||
case "$state_should" in
|
case "$state_should" in
|
||||||
present)
|
present)
|
||||||
|
|
Loading…
Reference in a new issue