forked from ungleich-public/cdist
add changes for 2.1 boolean version
Signed-off-by: Nico Schottelius <nico@brief.schottelius.org>
This commit is contained in:
parent
3140c009d3
commit
e82c11cce4
1 changed files with 2 additions and 3 deletions
|
@ -18,7 +18,6 @@
|
||||||
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
# along with cdist. If not, see <http://www.gnu.org/licenses/>.
|
||||||
#
|
#
|
||||||
|
|
||||||
# Check state and exit if nothing needs to be done
|
|
||||||
state_should="present"
|
state_should="present"
|
||||||
[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")"
|
[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")"
|
||||||
state_is="$(cat "$__object/explorer/state")"
|
state_is="$(cat "$__object/explorer/state")"
|
||||||
|
@ -27,9 +26,9 @@ state_is="$(cat "$__object/explorer/state")"
|
||||||
destination="/$__object_id"
|
destination="/$__object_id"
|
||||||
|
|
||||||
mkdiropt=""
|
mkdiropt=""
|
||||||
grep yes "$__object/parameter/parents" >/dev/null 2>&1 && mkdiropt="-p"
|
[ -f "$__object/parameter/parents" ] && mkdiropt="-p"
|
||||||
recursive=""
|
recursive=""
|
||||||
grep yes "$__object/parameter/recursive" >/dev/null 2>&1 && recursive="-R"
|
[ -f "$__object/parameter/recursive" ] && recursive="-R"
|
||||||
|
|
||||||
case "$state_should" in
|
case "$state_should" in
|
||||||
present)
|
present)
|
||||||
|
|
Loading…
Reference in a new issue