This is an automated email from the git hooks/post-receive script. It was generated because a ref change was pushed to the repository containing the project "IPFire 2.x development tree".
The branch, next has been updated via dcc9dcbdc4b788d65c70a594ebfc94c7c247fa3f (commit) from 0b1d3e68d50513e0b119b455b652d80727060af0 (commit)
Those revisions listed above that are new to this repository have not appeared on any other notification email; so we list those revisions in full, below.
- Log ----------------------------------------------------------------- commit dcc9dcbdc4b788d65c70a594ebfc94c7c247fa3f Author: Arne Fitzenreiter arne_f@ipfire.org Date: Thu Aug 19 23:18:05 2010 +0200
Updater: converting fstab entries to UUID. todo add UUID's if they are missing...
-----------------------------------------------------------------------
Summary of changes: config/rootfiles/core/test/update.sh | 59 ++++++++++++++++++++++++++++++++- 1 files changed, 57 insertions(+), 2 deletions(-)
Difference in files: diff --git a/config/rootfiles/core/test/update.sh b/config/rootfiles/core/test/update.sh index 1a18fce..7d136c8 100644 --- a/config/rootfiles/core/test/update.sh +++ b/config/rootfiles/core/test/update.sh @@ -25,7 +25,6 @@ /usr/local/bin/backupctrl exclude >/dev/null 2>&1 # KVER="2.6.32.19" -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 echo $MOUNT > /dev/null @@ -33,6 +32,8 @@ MOUNT=$_ if [ ! $MOUNT == "rw" ]; then MOUNT="ro" fi + + # # check if we the backup file already exist if [ -e /var/ipfire/backup/core-upgrade_$KVER.tar.bz2 ]; then @@ -80,12 +81,66 @@ echo Unpack the updated files ... # tar xvf /opt/pakfire/tmp/files --preserve --numeric-owner -C / \ --no-overwrite-dir + +# Convert /etc/fstab entries to UUID ... +# +echo Convert fstab entries to UUID ... +ROOT=`mount | grep " / " | cut -d" " -f1` +BOOT=`mount | grep " /boot " | cut -d" " -f1` +VAR=`mount | grep " /var " | cut -d" " -f1` +SWAP=`grep "/dev/" /proc/swaps | cut -d" " -f1` +# + +if [ ! -z $ROOT ]; then + ROOTUUID=`blkid -sUUID $ROOT | cut -d'"' -f2` + if [ ! -z $ROOTUUID ]; then + sed -i "s|^$ROOT|UUID=$ROOTUUID|g" /etc/fstab + #else + #to do add uuid to rootfs + fi + else + echo "ERROR! / not found!!!" +fi + +if [ ! -z $BOOT ]; then + BOOTUUID=`blkid -sUUID $BOOT | cut -d'"' -f2` + if [ ! -z $BOOTUUID ]; then + sed -i "s|^$BOOT|UUID=$BOOTUUID|g" /etc/fstab + #else + #to do add uuid to bootfs + fi + else + echo "WARNING! /boot not found!!!" +fi + +if [ ! -z $VAR ]; then + VARUUID=`blkid -sUUID $VAR | cut -d'"' -f2` + if [ ! -z $VARUUID ]; then + sed -i "s|^$VAR|UUID=$VARUUID|g" /etc/fstab + #else + #to do add uuid to varfs + fi + else + echo "WARNING! /var not found!!!" +fi + +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 + fi + else + echo "WARNING! swap not found!!!" +fi + # # Modify grub.conf # echo echo Update grub configuration ... -sed -i "s|ROOT|$ROOT|g" /boot/grub/grub.conf +sed -i "s|ROOT|UUID=$ROOTUUID|g" /boot/grub/grub.conf sed -i "s|KVER|$KVER|g" /boot/grub/grub.conf sed -i "s|MOUNT|$MOUNT|g" /boot/grub/grub.conf
hooks/post-receive -- IPFire 2.x development tree