Add sync statement for efi_create_syructure() + indetation

This commit is contained in:
Yorick Barbanneau 2019-02-25 12:36:55 +01:00
parent 7345b86390
commit e2f41eb862

View file

@ -167,7 +167,7 @@ fi
# unmount if device is mounted
umount_device (){
local mounted_part=$(mount | grep "${1}[0-9]" | awk '{print $3}')
if [ ! -z $mounted_part ]
if [ ! "$mounted_part" == "" ]
then
for part in $mounted_part
do
@ -185,6 +185,7 @@ parted -s $1 mklabel gpt mkpart EFS fat32 1MiB 128MiB set 1 boot on mkpart debia
sleep 2
mkfs.vfat ${1}1 -n efi &> /dev/null
mkfs.vfat ${1}2 -n debian &> /dev/null
sync
mount ${1}2 $2
create_dir $2/efi
mount ${1}1 $2/efi