]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - config/rootfiles/core/86/update.sh
core86: fix init restart.
[ipfire-2.x.git] / config / rootfiles / core / 86 / update.sh
index c58780bce7c40570425936288cf7f46f76b1e7d1..bdb96fc6e475c48cb6bc9f1467b28d1a064957d7 100644 (file)
@@ -100,6 +100,7 @@ echo Update Kernel to $KVER ...
 rm -rf /boot/System.map-*
 rm -rf /boot/config-*
 rm -rf /boot/ipfirerd-*
+rm -rf /boot/initramfs-*
 rm -rf /boot/vmlinuz-*
 rm -rf /boot/uImage-ipfire-*
 rm -rf /boot/uInit-ipfire-*
@@ -127,7 +128,7 @@ tar xavf /opt/pakfire/tmp/files* --no-overwrite-dir -p --numeric-owner -C /
 
 #
 #restart init because glibc was updated.
-telinit i
+telinit u
 
 # Check diskspace on boot
 BOOTSPACE=`df /boot -Pk | sed "s| * | |g" | cut -d" " -f4 | tail -n 1`
@@ -179,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