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
25
init.sh
25
init.sh
|
@ -170,18 +170,19 @@ create_dir(){
|
||||||
|
|
||||||
# unmount if device is mounted
|
# unmount if device is mounted
|
||||||
umount_device (){
|
umount_device (){
|
||||||
local mounted_part=$(mount | grep "${1}[0-9]" | awk '{print $3}')
|
local mounted_part
|
||||||
if [ ! "$mounted_part" == "" ]
|
mounted_part=$(mount | grep "${1}[0-9]" | awk '{print $3}')
|
||||||
then
|
if [ ! "$mounted_part" == "" ]
|
||||||
for part in $mounted_part
|
then
|
||||||
do
|
for part in $mounted_part
|
||||||
if [ -d $part ]
|
do
|
||||||
then
|
if [ -d "$part" ]
|
||||||
printf "Unmount %s\n " "$part"
|
then
|
||||||
umount $part --recursive
|
printf "Unmount %s\n " "$part"
|
||||||
fi
|
umount "$part" --recursive
|
||||||
done
|
fi
|
||||||
fi
|
done
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
efi_create_key_structure () {
|
efi_create_key_structure () {
|
||||||
|
|
Reference in a new issue