diff options
author | Irina Gómez <irinagomez@us.es> | 2019-02-04 11:34:26 +0100 |
---|---|---|
committer | Irina Gómez <irinagomez@us.es> | 2019-02-04 11:34:26 +0100 |
commit | e9601e1f70519e9e380e6198e29df2f695ffbd94 (patch) | |
tree | a6dec5245cad8aa129baca5e42742498ca2c262e /client/engine/Disk.lib | |
parent | 20e5aa9e4558004d6d46fddd033f04d59afe61a0 (diff) |
#802 #889 #890 ogGrubInstallPartitions, ogGrubInstallMbr y ogRestoreEfiBootLoader: Format EFI partition if it is not. ogGetEsp: Detecting the EFI partition does not require VFAT filesystem.
Diffstat (limited to 'client/engine/Disk.lib')
-rwxr-xr-x | client/engine/Disk.lib | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/client/engine/Disk.lib b/client/engine/Disk.lib index 50ce04e8..050438d7 100755 --- a/client/engine/Disk.lib +++ b/client/engine/Disk.lib @@ -258,7 +258,7 @@ ogCreatePartitionTable $ND # Definir particiones y notificar al kernel. # Borramos primero las particiones y luego creamos las nuevas sgdisk $DELOPTIONS $OPTIONS $DISK 2>/dev/null && partprobe $DISK -[ -n "$CACHESIZE" ] && ogMountCache 2>/dev/null +[ -n "$CACHESIZE" ] && ogMountCache 2>/dev/null || return 0 } @@ -684,8 +684,9 @@ echo $TYPE function ogGetEsp () { local PART d -for d in $(blkid -t TYPE=vfat -o device); do - PART="$(ogDevToDisk $d)" +for d in $(blkid -o device|sort); do + # Previene error para /dev/loop0 + PART="$(ogDevToDisk $d 2>/dev/null)" || continue if [ "$(ogGetPartitionId $PART)" == "$(ogTypeToId EFI GPT)" ]; then echo $PART break |