X-Git-Url: http://git.ipfire.org/?p=people%2Fpmueller%2Fipfire-2.x.git;a=blobdiff_plain;f=config%2Frootfiles%2Fcore%2Ftest%2Fupdate.sh;h=1aae08e46387995ee508594f3f0a7f46306daeeb;hp=e4fef10bb293935553990581948471d38a2f857e;hb=f4729b4fa37262986102c814b2ddbcf07897ef1b;hpb=3834d135ecb9383995f305cfe4fa18e9c7511495 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 #