mkdiropt needs to be unquoted => empty if not existing

Otherwise this happens:

    root@lilly ~ # cat
    /var/lib/cdist/object/__directory/vm/.cdist/code-remote
    rm -f "/vm"
    mkdir "" "/vm"

which results into

    mkdir: cannot create directory `': No such file or directory

Signed-off-by: Nico Schottelius <nico@bento.schottelius.org>
This commit is contained in:
Nico Schottelius 2013-12-01 22:33:13 +01:00
parent e58a467327
commit a6e2cf853e
2 changed files with 2 additions and 1 deletions

View File

@ -75,7 +75,7 @@ case "$state_should" in
set_attributes=1
cat << DONE
rm -f "$destination"
mkdir "$mkdiropt" "$destination"
mkdir $mkdiropt "$destination"
DONE
fi

View File

@ -9,6 +9,7 @@ Changelog
* Type __file: Only remove file when state is absent (Steven Armstrong)
* Type __link: Only remove link when state is absent (Steven Armstrong)
* Type __directory: Only remove directory when state is absent (Steven Armstrong)
* Type __directory: Fix newly introduced quoting issue
* Core: Fix backtrace when cache cannot be deleted
2.3.6: 2013-11-25