From: xf0r3m Date: Wed, 24 Apr 2024 11:10:16 +0000 (+0200) Subject: immudex-upgrade - aktualizacja GRUB-a - BT #169 X-Git-Url: https://gitweb.morketsmerke.org/?a=commitdiff_plain;h=e20e801fe2ea7ca5f29ddc0b88ec18980cfb248f;p=immudex.git immudex-upgrade - aktualizacja GRUB-a - BT #169 --- diff --git a/tools/sbin/immudex-upgrade b/tools/sbin/immudex-upgrade index 80ef41d..6a147bb 100755 --- a/tools/sbin/immudex-upgrade +++ b/tools/sbin/immudex-upgrade @@ -63,6 +63,13 @@ if [ "$1" ]; then if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi echo "Copying immudex files to the disk..."; cp -vv /run/live/medium/live/* /mnt/live; + if $(sudo efibootmgr > /dev/null 2>&1); then + echo "Copying grub config to the disk..."; + cp -vv /run/live/medium/boot/grub/grub.cfg /mnt/boot/grub/grub.cfg; + if [ $? -eq 0 ]; then echo -e "[ ${GREEN}OK${ENDCOLOR} ]"; fi + sed -i '/set\ timeout=/ s/30/5/' /mnt/boot/grub/grub.cfg; + sed -i 's/bootfrom=removable //g' /mnt/boot/grub/grub.cfg; + fi fi if [ $? -eq 0 ]; then echo -e "Copying immudex files to the disk...[ ${GREEN}OK${ENDCOLOR} ]";