diff options
author | Irina Gómez <irinagomez@us.es> | 2019-10-18 11:42:03 +0200 |
---|---|---|
committer | Irina Gómez <irinagomez@us.es> | 2019-10-18 11:42:03 +0200 |
commit | 8b9b6ecbeec793545a4a3f205d8ef0c4403f7a5a (patch) | |
tree | a4fda362c4762d5d8c0a54897077550222a89bd0 /client | |
parent | 6c69617d3e9c73dcaf135e28720650dbc1d4c57b (diff) |
#802 #890 Fixed error in ogRefindInstall: boots linux correctly and shows a menu entry for ogLive when secure boot is inactive.
Diffstat (limited to 'client')
-rwxr-xr-x | client/engine/Boot.lib | 39 |
1 files changed, 22 insertions, 17 deletions
diff --git a/client/engine/Boot.lib b/client/engine/Boot.lib index 6808f094..23bd5659 100755 --- a/client/engine/Boot.lib +++ b/client/engine/Boot.lib @@ -2771,24 +2771,29 @@ else # Configuración para sistemas restaurados con OpenGnsys for DIR in $(ls -d /mnt/sda1/EFI/Part-*-* 2>/dev/null); do echo "menuentry \"${DIR##*/}\" {" >> $CFGFILE - echo " loader /EFI/${DIR##*/}/Boot/ogloader.efi" >> $CFGFILE - [ -f $DIR/Boot/bootmgfw.efi ] && echo " icon /EFI/refind/icons/os_win8.png" >> $CFGFILE - [ -f $DIR/Boot/grubx64.efi ] && echo " icon /EFI/refind/icons/os_linux.png" >> $CFGFILE + if [ -f $DIR/Boot/grubx64.efi ]; then + echo " loader /EFI/${DIR##*/}/Boot/grubx64.efi" >> $CFGFILE + echo " icon /EFI/refind/icons/os_linux.png" >> $CFGFILE + else + echo " loader /EFI/${DIR##*/}/Boot/ogloader.efi" >> $CFGFILE + [ -f $DIR/Boot/bootmgfw.efi ] && echo " icon /EFI/refind/icons/os_win8.png" >> $CFGFILE + fi echo "}" >> $CFGFILE done - # Configuración ogLive - # Comantamos temporalmente: Con la versión nueva de refind falla - #if [ "$OGLIVE" != "" ]; then - # echo "menuentry \"OpenGnsys Live\" {" >> $CFGFILE - # echo " volume CACHE" >> $CFGFILE - # echo " ostype Linux" >> $CFGFILE - # echo " loader /boot/$(basename ${OGLIVE%/*})/ogvmlinuz" >> $CFGFILE - # echo " initrd /boot/$(basename ${OGLIVE%/*})/oginitrd.img" >> $CFGFILE - # echo " options \"$CMDLINE\"" >> $CFGFILE - # echo "}" >> $CFGFILE - - # # Ponemos ogLive como la entrada por defecto - # sed -i '1 i\default_selection "OpenGnsys Live"' $CFGFILE - #fi + # Configuración ogLive si secureboot no está activado + if ! dmesg|grep secureboot.*enabled &>/dev/null; then + if [ "$OGLIVE" != "" ]; then + echo "menuentry \"OpenGnsys Live\" {" >> $CFGFILE + echo " volume CACHE" >> $CFGFILE + echo " ostype Linux" >> $CFGFILE + echo " loader /boot/$(basename ${OGLIVE%/*})/ogvmlinuz" >> $CFGFILE + echo " initrd /boot/$(basename ${OGLIVE%/*})/oginitrd.img" >> $CFGFILE + echo " options \"$CMDLINE\"" >> $CFGFILE + echo "}" >> $CFGFILE + + # Ponemos ogLive como la entrada por defecto + sed -i '1 i\default_selection "OpenGnsys Live"' $CFGFILE + fi + fi fi } |