]> git.ipfire.org Git - ipfire-2.x.git/blobdiff - config/rootfiles/updater/update.sh
Updated kernel to 2.6.24.7
[ipfire-2.x.git] / config / rootfiles / updater / update.sh
index 73ad51710725c9820bc9d6890d2075dfd320ec07..98555c0db3d75968907572fc24c514ac6da5d2ec 100755 (executable)
@@ -26,7 +26,7 @@
 #
 OLDVERSION=`grep "version = " /opt/pakfire/etc/pakfire.conf | cut -d'"' -f2`
 NEWVERSION="2.3"
-KVER="2.6.20.21"
+KVER="2.6.24.7"
 ROOT=`grep "root=" /boot/grub/grub.conf | cut -d"=" -f2 | cut -d" " -f1 | tail -n 1`
 MOUNT=`grep "kernel" /boot/grub/grub.conf | tail -n 1`
 # Nur den letzten Parameter verwenden
@@ -46,11 +46,18 @@ if [ -e /var/ipfire/backup/update_$OLDVERSION-$NEWVERSION.tar.bz2 ]; then
 fi
 echo First we made a backup of all files that was inside of the
 echo update archive. This may take a while ...
+# Add issue and packfire conf to backup
+echo etc/issue >> ROOTFILES
+echo opt/pakfire/etc/pakfire.conf >> ROOTFILES
 tar cjvf /var/ipfire/backup/update_$OLDVERSION-$NEWVERSION.tar.bz2 \
    -T ROOTFILES --exclude='#*' -C / > /dev/null 2>&1 
 echo
 echo Update IPfire to $NEWVERSON ...
 #
+# Delete old collectd symlink
+#
+rm -rf /etc/rc.d/rc3.d/S20collectd
+#
 # Backup the old grub config
 #
 mv /boot/grub/grub.conf /boot/grub/grub-old.conf
@@ -81,8 +88,9 @@ if [ "${ROOT:0:7}" == "/dev/sd" ]; then
     sed -i "s| ide | |g" /etc/mkinitcpio.conf
 else
 if [ "${ROOT:0:7}" == "/dev/hd" ]; then
-    # Remove pata hook if root is on hda 
+    # Remove pata & sata hook if root is on hda 
     sed -i "s| pata | |g" /etc/mkinitcpio.conf
+    sed -i "s| sata | |g" /etc/mkinitcpio.conf
 fi
 fi
 mkinitcpio -k $KVER-ipfire -g /boot/ipfirerd-$KVER.img
@@ -92,6 +100,10 @@ mkinitcpio -k $KVER-ipfire-smp -g /boot/ipfirerd-$KVER-smp.img
 #
 sed -i "s|$OLDVERSION|$NEWVERSION|g" /opt/pakfire/etc/pakfire.conf
 #
+# Delete lists of the old version
+#
+rm -f /opt/pakfire/db/lists/*list.db
+#
 # Create new issue
 #
 echo IPFire v$NEWVERSION - www.ipfire.org > /etc/issue