diff options
-rwxr-xr-x | client/engine/Boot.lib | 13 | ||||
-rw-r--r-- | client/engine/UEFI.lib | 4 | ||||
-rwxr-xr-x | client/shared/scripts/createImage | 2 |
3 files changed, 10 insertions, 9 deletions
diff --git a/client/engine/Boot.lib b/client/engine/Boot.lib index db72e440..4e7b30eb 100755 --- a/client/engine/Boot.lib +++ b/client/engine/Boot.lib @@ -67,7 +67,7 @@ case "$TYPE" in # Si no se indican, obtiene los parámetros de arranque para Linux. PARAMS="${3:-$(ogLinuxBootParameters $1 $2 2>/dev/null)}" # Si no existe y el UEFI buscar en particion ESP - [ -z "$PARAMS" -a ogIsEfiActive ] && PARAMS="$(ogLinuxBootParameters $(ogGetEsp))" + [ -z "$PARAMS" ] && ogIsEfiActive && PARAMS="$(ogLinuxBootParameters $(ogGetEsp))" # Si no existe, buscar sistema de archivo /boot en /etc/fstab. if [ -z "$PARAMS" -a -e $MNTDIR/etc/fstab ]; then # Localizar S.F. /boot en /etc/fstab del S.F. actual. @@ -569,7 +569,7 @@ ogDiskToDev $1 $2 || return $(ogRaiseError $OG_ERR_PARTITION; echo $?) let DISK=$1-1 PART=$2 FILE=/tmp/temp$$ -if [ ogIsEfiActive ]; then +if ogIsEfiActive; then read BOOTDISK BOOTPART <<< $(ogGetEsp) ogUnmount $BOOTDISK $BOOTPART || ogRaiseError $OG_ERR_PARTITION "ESP: $BOOTDISK $BOOTPART" || return $? @@ -885,7 +885,7 @@ fi updateBootCache # Si no existe el fichero grub.cfg pero sí el backup lo recupero (para UEFI) -if [ ogIsEfiActive -a -f ${SECONDSTAGE}/boot/grub/grub.cfg$BACKUPNAME ]; then +if ogIsEfiActive && [ -f ${SECONDSTAGE}/boot/grub/grub.cfg$BACKUPNAME ]; then [ -f ${SECONDSTAGE}/boot/grub/grub.cfg ] || mv ${SECONDSTAGE}/boot/grub/grub.cfg$BACKUPNAME ${SECONDSTAGE}/boot/grub/grub.cfg fi @@ -1025,7 +1025,7 @@ then fi # Si no existe el fichero grub.cfg pero sí el backup lo recupero (para UEFI) -if [ ogIsEfiActive -a -f ${SECONDSTAGE}/boot/grub/grub.cfg$BACKUPNAME ]; then +if ogIsEfiActive && [ -f ${SECONDSTAGE}/boot/grub/grub.cfg$BACKUPNAME ]; then [ -f ${SECONDSTAGE}/boot/grub/grub.cfg ] || mv ${SECONDSTAGE}/boot/grub/grub.cfg$BACKUPNAME ${SECONDSTAGE}/boot/grub/grub.cfg fi @@ -1123,7 +1123,7 @@ else sed "/swap/d" ${FSTAB}.backup > ${FSTAB} fi # Si es un sistema EFI incluimos partición ESP (Si existe la modificamos) -if [ ogIsEfiActive ]; then +if ogIsEfiActive; then read EFIDISK EFIPART <<< $(ogGetEsp) EFIDEV=$(ogDiskToDev $EFIDISK $EFIPART) @@ -1650,11 +1650,12 @@ fi updateBootCache # Si no existe el fichero grub.cfg pero sí el backup lo recupero (para UEFI) -if [ ogIsEfiActive -a -f ${SECONDSTAGE}/boot/grub/grub.cfg$BACKUPNAME ]; then +if ogIsEfiActive && [ -f ${SECONDSTAGE}/boot/grub/grub.cfg$BACKUPNAME ]; then [ -f ${SECONDSTAGE}/boot/grub/grub.cfg ] || mv ${SECONDSTAGE}/boot/grub/grub.cfg$BACKUPNAME ${SECONDSTAGE}/boot/grub/grub.cfg RECOVERYBACKUP=TRUE fi + #Configur la sintaxis grub para evitar menus de "recovery" en el OGLive echo "GRUB_DISABLE_RECOVERY=\"true\"" >> /etc/default/grub echo "GRUB_DISABLE_LINUX_UUID=\"true\"" >> /etc/default/grub diff --git a/client/engine/UEFI.lib b/client/engine/UEFI.lib index c467523b..fea81135 100644 --- a/client/engine/UEFI.lib +++ b/client/engine/UEFI.lib @@ -176,7 +176,7 @@ case $OSVERSION in [ -r $EFIDIR/$BOOTLABEL ] && rm -rf $EFIDIR/$BOOTLABEL mkdir -p $EFIDIR/EFI/$BOOTLABEL cp -r "${LOADER%/*}" $EFIDIR/EFI/$BOOTLABEL - # Nombre genérico para cargador + # Nombre OpenGnsys para cargador cp $LOADER $EFIDIR/EFI/$BOOTLABEL/Boot/ogloader.efi ;; esac @@ -205,7 +205,7 @@ fi [ $# -eq 4 ] || ogRaiseError $OG_ERR_FORMAT "$FUNCNAME REPO|CACHE str_imgname int_ndisk int_npart" || return $? # Sólo se ejecuta si es UEFI -[ ogIsEfiActive ] || return +ogIsEfiActive || return # Parámetros de entrada IMGNAME="$2" diff --git a/client/shared/scripts/createImage b/client/shared/scripts/createImage index b15955c0..7b99afe2 100755 --- a/client/shared/scripts/createImage +++ b/client/shared/scripts/createImage @@ -128,7 +128,7 @@ ogCheckFs $1 $2 || exit $(ogRaiseError $OG_ERR_PARTITION "ogCheckFs $1 $2" && ec # Si es UEFI copio el cargador de arranque a la partición OSTYPE="$(ogGetOsType $1 $2)" -if [ ogIsEfiActive -a "$OSTYPE" == "Windows" ] ; then +if ogIsEfiActive && [ "$OSTYPE" == "Windows" ]; then ogEcho log session "[25] $MSG_HELP_ogCopyEfiBootLoader" ogCopyEfiBootLoader $1 $2 echo ogSaveImageInfo $1 $2 "$REPO" "$4" |