From: Arne Fitzenreiter Date: Wed, 15 Sep 2010 11:59:14 +0000 (+0200) Subject: Add uuid to swap partition at update. X-Git-Tag: v2.9-beta1~48^2~5^2~2^2~87 X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=commitdiff_plain;h=f4729b4fa37262986102c814b2ddbcf07897ef1b Add uuid to swap partition at update. --- diff --git a/config/rootfiles/core/test/update.sh b/config/rootfiles/core/test/update.sh index e4fef10bb2..1aae08e463 100644 --- a/config/rootfiles/core/test/update.sh +++ b/config/rootfiles/core/test/update.sh @@ -82,6 +82,12 @@ echo Unpack the updated files ... tar xvf /opt/pakfire/tmp/files --preserve --numeric-owner -C / \ --no-overwrite-dir +# +# Stop services to save memory +# +/etc/init.d/snort stop +/etc/init.d/squid stop + # Convert /etc/fstab entries to UUID ... # echo Convert fstab entries to UUID ... @@ -128,13 +134,26 @@ if [ ! -z $SWAP ]; then SWAPUUID=`blkid -sUUID $SWAP | cut -d'"' -f2` if [ ! -z $SWAPUUID ]; then sed -i "s|^$SWAP|UUID=$SWAPUUID|g" /etc/fstab - #else - #to do add uuid to swap + else + # Reformat swap to add a UUID + swapoff -a + mkswap $SWAP + swapon -a + SWAPUUID=`blkid -sUUID $SWAP | cut -d'"' -f2` + if [ ! -z $SWAPUUID ]; then + sed -i "s|^$SWAP|UUID=$SWAPUUID|g" /etc/fstab + fi fi else echo "WARNING! swap not found!!!" fi +# +# Start services +# +/etc/init.d/squid start +/etc/init.d/snort start + # # Modify grub.conf # @@ -158,13 +177,20 @@ else sed -i -e "s| panic=10 | console=ttyS0,38400n8 panic=10 |g" /boot/grub/grub.conf fi # +# Change /dev/hd? to /dev/sda +# +if [ "${ROOT:0:7}" == "/dev/hd" ];then + sed -i -e "s|${ROOT:0:8}|/dev/sda|g" /boot/grub/grub.conf + sed -i -e "s|${ROOT:0:8}|/dev/sda|g" /etc/fstab +fi +# # ReInstall grub # grub-install --no-floppy ${ROOT::`expr length $ROOT`-1} --recheck # # Rebuild Language # -#perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang" +perl -e "require '/var/ipfire/lang.pl'; &Lang::BuildCacheLang" # # Delete old lm-sensor modullist to force search at next boot # diff --git a/doc/packages-list.txt b/doc/packages-list.txt index c0bfddb275..dddc8664a4 100644 --- a/doc/packages-list.txt +++ b/doc/packages-list.txt @@ -345,8 +345,8 @@ * usb-modeswitch-data-20100707 * usbutils-0.72 * util-linux-2.12r -* v4l-dvb-b576509ea6d2-kmod-2.6.32.21-ipfire -* v4l-dvb-b576509ea6d2-kmod-2.6.32.21-ipfire-xen +* v4l-dvb-990bbeaeb761-kmod-2.6.32.21-ipfire +* v4l-dvb-990bbeaeb761-kmod-2.6.32.21-ipfire-xen * vdr-1.6.0 * vdradmin-am-3.6.7 * vim-7.0