From: Arne Fitzenreiter Date: Tue, 12 Oct 2010 06:01:53 +0000 (+0200) Subject: Fix linux-xen install.sh root detection with UUID. X-Git-Tag: v2.9-beta1~48^2~5^2~2^2~64 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=707b4fa1485867304144fbfb2c74b1e602cc5d6e;p=ipfire-2.x.git Fix linux-xen install.sh root detection with UUID. --- diff --git a/src/paks/linux-xen/install.sh b/src/paks/linux-xen/install.sh index dab7dd7752..8b46c89cf2 100644 --- a/src/paks/linux-xen/install.sh +++ b/src/paks/linux-xen/install.sh @@ -25,11 +25,20 @@ extract_files # KVER=2.6.32.24 -ROOT=`grep "root=" /boot/grub/grub.conf | cut -d"=" -f2 | cut -d" " -f1 | tail -n 1` +ROOT=`mount | grep " / " | cut -d" " -f1` +ROOTUUID=`blkid -c /dev/null -sUUID $ROOT | cut -d'"' -f2` +if [ ! -z $ROOTUUID ]; then + ROOT="UUID=$ROOTUUID" +fi + MOUNT=`grep "kernel" /boot/grub/grub.conf | tail -n 1` # Nur den letzten Parameter verwenden echo $MOUNT > /dev/null MOUNT=$_ +if [ ! $MOUNT == "rw" ]; then + MOUNT="ro" +fi + ENTRY=`grep "savedefault" /boot/grub/grub.conf | tail -n 1` # Nur den letzten Parameter verwenden echo $ENTRY > /dev/null