]> git.ipfire.org Git - people/pmueller/ipfire-2.x.git/blobdiff - config/rootfiles/updater/update.sh
Add checkfstab (repair fstab and grup.conf if the rootdevice has changed)
[people/pmueller/ipfire-2.x.git] / config / rootfiles / updater / update.sh
index 7f7d72ad33838dd6559f68e904da0a55b843150d..1f601877fc63daf4e64d02526f2e60a9bf065b27 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.23.17"
 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
@@ -54,6 +54,10 @@ tar cjvf /var/ipfire/backup/update_$OLDVERSION-$NEWVERSION.tar.bz2 \
 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
@@ -84,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
@@ -95,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