]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - src/paks/linux-pae/install.sh
kernel-pae: update un/install scripts for grub2.
[ipfire-2.x.git] / src / paks / linux-pae / install.sh
index ab740512fea6ad97e8811fa89c408686a82d9345..3d59d70c00c3aacdd4042f7736e8007ef966704a 100644 (file)
@@ -17,7 +17,7 @@
 # along with IPFire; if not, write to the Free Software                    #
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307 USA #
 #                                                                          #
-# Copyright (C) 2007-2013 IPFire-Team <info@ipfire.org>.                   #
+# Copyright (C) 2007-2014 IPFire-Team <info@ipfire.org>.                   #
 #                                                                          #
 ############################################################################
 #
@@ -31,6 +31,7 @@ if [ ! -z $ROOTUUID ]; then
        ROOT="UUID=$ROOTUUID"
 fi
 
+if [ -f /boot/grub/grub.conf ]; then
 MOUNT=`grep "kernel" /boot/grub/grub.conf | tail -n 1`
 # Nur den letzten Parameter verwenden
 echo $MOUNT > /dev/null
@@ -63,18 +64,24 @@ echo "title IPFire (PAE-Kernel)" >> /boot/grub/grub.conf
 echo "  kernel /vmlinuz-$KVER-ipfire-pae root=$ROOT panic=10$console $MOUNT" >> /boot/grub/grub.conf
 echo "  initrd /ipfirerd-$KVER-pae.img" >> /boot/grub/grub.conf
 echo "  savedefault $ENTRY" >> /boot/grub/grub.conf
+fi
+
+#
+# Create new module depency
+#
+depmod -a $KVER-ipfire-pae
 #
 # Made initramdisk
 #
-/sbin/dracut --force --verbose /boot/ipfirerd-$KVER-pae.img $KVER-ipfire-pae
+/usr/bin/dracut --force --xz /boot/initramfs-$KVER-ipfire-pae.img $KVER-ipfire-pae  
+
 #
-# Create new module depency
+# Update grub2 config
 #
-depmod -a $KVER-ipfire-pae
+grub-mkconfig > /boot/grub/grub.cfg
 
-# Default pae and request a reboot if pae is supported
+# request a reboot if pae is supported
 if [ ! "$(grep "^flags.* pae " /proc/cpuinfo)" == "" ]; then
-       grub-set-default $ENTRY
        touch /var/run/need_reboot
 fi
 sync && sync
\ No newline at end of file