Use -z and -n in printconf instead of == "" and != ""
[matthijs/upstream/backupninja.git] / lib / tools.in
index 9879e741039a5994bd544fd8e60896c9612d6cd5..eeec5900ce567201f8b449eb9096898546d6164c 100644 (file)
@@ -34,7 +34,7 @@ function printconf() {
    local CURRENT_PARAM=$1
    local ret=`@AWK@ -f $libdirectory/parseini S=$CURRENT_SECTION P=$CURRENT_PARAM $CURRENT_CONF_FILE`
    # if nothing is returned, set the default
-   if [ "$ret" == "" -a "$2" != "" ]; then
+   if [ -z "$ret" -a -n "$2" ]; then
       ret="$2"
    fi