Initialize variables to empty string
Set mode, group, etc. to an empty string to ensure that no external environment variables can leak in.
This commit is contained in:
parent
fc1a9ed27b
commit
919707d6f9
1 changed files with 5 additions and 0 deletions
|
@ -27,10 +27,15 @@ mode_is="$(cat "$__object/explorer/mode")"
|
||||||
|
|
||||||
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")"
|
||||||
|
mode=""
|
||||||
[ -f "$__object/parameter/mode" ] && mode="$(cat "$__object/parameter/mode")"
|
[ -f "$__object/parameter/mode" ] && mode="$(cat "$__object/parameter/mode")"
|
||||||
|
owner=""
|
||||||
[ -f "$__object/parameter/owner" ] && owner="$(cat "$__object/parameter/owner")"
|
[ -f "$__object/parameter/owner" ] && owner="$(cat "$__object/parameter/owner")"
|
||||||
|
group=""
|
||||||
[ -f "$__object/parameter/group" ] && group="$(cat "$__object/parameter/group")"
|
[ -f "$__object/parameter/group" ] && group="$(cat "$__object/parameter/group")"
|
||||||
|
mkdiropt=""
|
||||||
[ -f "$__object/parameter/parents" ] && mkdiropt="-p"
|
[ -f "$__object/parameter/parents" ] && mkdiropt="-p"
|
||||||
|
recursive=""
|
||||||
[ -f "$__object/parameter/recursive" ] && recursive="-R"
|
[ -f "$__object/parameter/recursive" ] && recursive="-R"
|
||||||
|
|
||||||
case "$state_should" in
|
case "$state_should" in
|
||||||
|
|
Loading…
Reference in a new issue