handle parameter --state explicilty to respect defaults

Signed-off-by: Steven Armstrong <steven@icarus.ethz.ch>
This commit is contained in:
Steven Armstrong 2013-12-16 13:29:43 +01:00
parent f165b5611e
commit 14dee79a9b
2 changed files with 6 additions and 3 deletions

View file

@ -1,6 +1,6 @@
#!/bin/sh
#
# 2011 Steven Armstrong (steven-cdist at armstrong.cc)
# 2011-2013 Steven Armstrong (steven-cdist at armstrong.cc)
#
# This file is part of cdist.
#
@ -44,10 +44,12 @@ else
esac
fi
set -- "$@" "$__object_id"
state="$(cat "$__object/parameter/state")"
set -- "$@" "$__object_id" "--state" "$state"
cd "$__object/parameter"
for property in $(ls .); do
if [ "$property" != "type" ]; then
if [ "$property" != "type" -a "$property" != "state" ]; then
set -- "$@" "--$property" "$(cat "$property")"
fi
done

View file

@ -0,0 +1 @@
present