]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - config/rootfiles/core/86/update.sh
Add script that automatically updates/installs GRUB2
[ipfire-2.x.git] / config / rootfiles / core / 86 / update.sh
index 6d1202300a8ddd687727c9bc3adb8461b690fbb7..db38844a37f2867b1ca76b5df2e3b2c382db18ca 100644 (file)
@@ -180,16 +180,10 @@ case "$(uname -m)" in
                        echo "GRUB_TERMINAL=\"serial\"" >> /etc/default/grub
                        echo "GRUB_SERIAL_COMMAND=\"serial --unit=0 --speed=115200\"" >> /etc/default/grub
                fi
-               grub-mkconfig -o /boot/grub/grub.cfg
 
-               ROOT=$(mount | grep " / " | cut -d" " -f1)
-               ROOT=${ROOT::-1}
-
-               if ! grub-install --no-floppy --recheck "${ROOT}"; then
-                       if ! grub-install --no-floppy --recheck --force "${ROOT}"; then
-                               logger -p syslog.emerg -t ipfire \
-                                       "Could not update the bootloader!"
-                       fi
+               if ! /usr/local/bin/update-bootloader; then
+                       logger -p syslog.emerg -t ipfire \
+                               "Could not update the bootloader!"
                fi
                ;;
 esac