X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=config%2Frootfiles%2Fcore%2F28%2Fupdate.sh;h=6c61902c3dbb7dd80b56d09f54b4811d9923a910;hp=3898af0e3112857dbffc7b756838f87a209c8061;hb=d046fed05c9773b774b446f13c2eb7d9afb08ffe;hpb=a3b414d38a128a78b086a9c1249e9a05063b4f44 diff --git a/config/rootfiles/core/28/update.sh b/config/rootfiles/core/28/update.sh index 3898af0e31..6c61902c3d 100755 --- a/config/rootfiles/core/28/update.sh +++ b/config/rootfiles/core/28/update.sh @@ -17,14 +17,17 @@ # along with IPFire; if not, write to the Free Software # # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA # # # -# Copyright (C) 2008 IPFire-Team . # +# Copyright (C) 2009 IPFire-Team . # # # ############################################################################ # . /opt/pakfire/lib/functions.sh /usr/local/bin/backupctrl exclude >/dev/null 2>&1 # -KVER="2.6.27.20" +OLDVERSION=`grep "version = " /opt/pakfire/etc/pakfire.conf | cut -d'"' -f2` +NEWVERSION="2.5" +# +KVER="2.6.27.23" 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 @@ -32,22 +35,24 @@ echo $MOUNT > /dev/null MOUNT=$_ # # check if we the backup file already exist -if [ -e /var/ipfire/backup/coreupdate28_$KVER.tar.gz ]; then +if [ -e /var/ipfire/backup/core-upgrade_$KVER.tar.bz2 ]; then echo Moving backup to backup-old ... - mv -f /var/ipfire/backup/coreupdate28_$KVER.tar.gz \ - /var/ipfire/backup/coreupdate28_$KVER-old.tar.gz + mv -f /var/ipfire/backup/core-upgrade_$KVER.tar.bz2 \ + /var/ipfire/backup/core-upgrade_$KVER-old.tar.bz2 fi echo First we made a backup of all files that was inside of the echo update archive. This may take a while ... # Add some files that are not in the package to backup echo lib/modules >> /opt/pakfire/tmp/ROOTFILES echo boot >> /opt/pakfire/tmp/ROOTFILES +echo etc/issue >> /opt/pakfire/tmp/ROOTFILES +echo opt/pakfire/etc/pakfire.conf >> /opt/pakfire/tmp/ROOTFILES +echo etc/sysconfig/lm_sensors >> /opt/pakfire/tmp/ROOTFILES # - -tar czvf /var/ipfire/backup/coreupdate28_$KVER.tar.gz.tar.gz \ - -T /opt/pakfire/tmp/ROOTFILES --exclude='#*' -C / > /dev/null 2>&1 +tar cjvf /var/ipfire/backup/core-upgrade_$KVER.tar.bz2 \ + -C / -T /opt/pakfire/tmp/ROOTFILES --exclude='#*' > /dev/null 2>&1 echo -echo Update IPfire Kernel to $KVER ... +echo Update IPfire to $NEWVERSION ... # Remove old kernel, configs, initrd, modules ... # rm -rf /boot/System.map-* @@ -103,9 +108,23 @@ grub-install --no-floppy ${ROOT::`expr length $ROOT`-1} --recheck # #perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang" # +# Delete old lm-sensor modullist... +# +rm -rf /etc/sysconfig/lm_sensors +# # Restart snort # /etc/init.d/snort restart # +# Change version of Pakfire.conf +# +sed -i "s|$OLDVERSION|$NEWVERSION|g" /opt/pakfire/etc/pakfire.conf +# +# Create new issue +# +echo IPFire v$NEWVERSION beta2 - www.ipfire.org > /etc/issue +echo =================================== >> /etc/issue +echo \\n running on \\s \\r \\m >> /etc/issue +# # This core-update need a reboot -/usr/bin/logger -p syslog.emerg -t core-upgrade-28 "Upgrade finished. Please reboot... "' >> /tmp/remove_obsolete_paks +/usr/bin/logger -p syslog.emerg -t core-upgrade-28 "Upgrade finished. Please reboot... "