parameter default handling in __key_value type corrected

This commit is contained in:
Daniel Heule 2014-01-21 23:18:10 +01:00
parent 360b42e892
commit b75481a4d4
3 changed files with 4 additions and 4 deletions

View file

@ -21,8 +21,8 @@
key="$__object_id"
[ -f "$__object/parameter/key" ] && key="$(cat "$__object/parameter/key")"
state_should=present
[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")"
state_should="$(cat "$__object/parameter/state")"
file="$(cat "$__object/parameter/file")"
delimiter="$(cat "$__object/parameter/delimiter")"

View file

@ -19,8 +19,7 @@
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
#
state_should=present
[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")"
state_should="$(cat "$__object/parameter/state")"
if [ "$state_should" = "present" -a ! -f "$__object/parameter/value" ]; then
echo "Missing required parameter 'value'" >&2

View file

@ -0,0 +1 @@
present