unmount_device() use double quote when needed
This commit is contained in:
parent
5ed96fcd13
commit
99aeeb677e
1 changed files with 13 additions and 12 deletions
13
init.sh
13
init.sh
|
@ -170,18 +170,19 @@ create_dir(){
|
|||
|
||||
# unmount if device is mounted
|
||||
umount_device (){
|
||||
local mounted_part=$(mount | grep "${1}[0-9]" | awk '{print $3}')
|
||||
if [ ! "$mounted_part" == "" ]
|
||||
then
|
||||
local mounted_part
|
||||
mounted_part=$(mount | grep "${1}[0-9]" | awk '{print $3}')
|
||||
if [ ! "$mounted_part" == "" ]
|
||||
then
|
||||
for part in $mounted_part
|
||||
do
|
||||
if [ -d $part ]
|
||||
if [ -d "$part" ]
|
||||
then
|
||||
printf "Unmount %s\n " "$part"
|
||||
umount $part --recursive
|
||||
umount "$part" --recursive
|
||||
fi
|
||||
done
|
||||
fi
|
||||
fi
|
||||
}
|
||||
|
||||
efi_create_key_structure () {
|
||||
|
|
Reference in a new issue