forked from ungleich-public/cdist
if no --source, then create only if there's no file
This commit is contained in:
parent
1582661da9
commit
0e8302c204
1 changed files with 5 additions and 2 deletions
|
@ -29,8 +29,11 @@ upload_file=
|
||||||
create_file=
|
create_file=
|
||||||
if [ "$state_should" = "present" -o "$state_should" = "exists" ]; then
|
if [ "$state_should" = "present" -o "$state_should" = "exists" ]; then
|
||||||
if [ ! -f "$__object/parameter/source" ]; then
|
if [ ! -f "$__object/parameter/source" ]; then
|
||||||
create_file=1
|
remote_stat="$(cat "$__object/explorer/stat")"
|
||||||
echo create >> "$__messages_out"
|
if [ -z "$remote_stat" ]; then
|
||||||
|
create_file=1
|
||||||
|
echo create >> "$__messages_out"
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
source="$(cat "$__object/parameter/source")"
|
source="$(cat "$__object/parameter/source")"
|
||||||
if [ "$source" = "-" ]; then
|
if [ "$source" = "-" ]; then
|
||||||
|
|
Loading…
Reference in a new issue