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:
Jason Staten 2013-01-28 10:06:04 -07:00
parent fc1a9ed27b
commit 919707d6f9

View file

@ -27,10 +27,15 @@ mode_is="$(cat "$__object/explorer/mode")"
state_should="present"
[ -f "$__object/parameter/state" ] && state_should="$(cat "$__object/parameter/state")"
mode=""
[ -f "$__object/parameter/mode" ] && mode="$(cat "$__object/parameter/mode")"
owner=""
[ -f "$__object/parameter/owner" ] && owner="$(cat "$__object/parameter/owner")"
group=""
[ -f "$__object/parameter/group" ] && group="$(cat "$__object/parameter/group")"
mkdiropt=""
[ -f "$__object/parameter/parents" ] && mkdiropt="-p"
recursive=""
[ -f "$__object/parameter/recursive" ] && recursive="-R"
case "$state_should" in