create_dir() use double quotes toprevent gobbing
This commit is contained in:
parent
a22a055fe3
commit
5ed96fcd13
1 changed files with 9 additions and 9 deletions
16
init.sh
16
init.sh
|
@ -156,16 +156,16 @@ process_conf_file (){
|
|||
|
||||
create_dir(){
|
||||
# $1 directory to create
|
||||
if [ ! -d $1 ]
|
||||
then
|
||||
mkdir -p $1
|
||||
else
|
||||
if [[ $2 == 1 ]]
|
||||
if [ ! -d "$1" ]
|
||||
then
|
||||
rm -rf $1
|
||||
create_dir $1
|
||||
mkdir -p "$1"
|
||||
else
|
||||
if [ "$2" -eq 1 ]
|
||||
then
|
||||
rm -rf "$1"
|
||||
create_dir "$1"
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
# unmount if device is mounted
|
||||
|
|
Reference in a new issue