From e82c11cce429ce68befbc5126e11ffb47b170997 Mon Sep 17 00:00:00 2001 From: Nico Schottelius Date: Fri, 21 Sep 2012 11:10:38 +0200 Subject: [PATCH] add changes for 2.1 boolean version Signed-off-by: Nico Schottelius --- conf/type/__directory/gencode-remote | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/conf/type/__directory/gencode-remote b/conf/type/__directory/gencode-remote index 56bd73a1..21f4c5b6 100755 --- a/conf/type/__directory/gencode-remote +++ b/conf/type/__directory/gencode-remote @@ -18,7 +18,6 @@ # along with cdist. If not, see . # -# Check state and exit if nothing needs to be done state_should="present" [ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")" state_is="$(cat "$__object/explorer/state")" @@ -27,9 +26,9 @@ state_is="$(cat "$__object/explorer/state")" destination="/$__object_id" mkdiropt="" -grep yes "$__object/parameter/parents" >/dev/null 2>&1 && mkdiropt="-p" +[ -f "$__object/parameter/parents" ] && mkdiropt="-p" recursive="" -grep yes "$__object/parameter/recursive" >/dev/null 2>&1 && recursive="-R" +[ -f "$__object/parameter/recursive" ] && recursive="-R" case "$state_should" in present)