From 0ac134a07efea78cdbefc0734b6c9202bea7c7b0 Mon Sep 17 00:00:00 2001 From: Arif Ali Date: Fri, 24 Feb 2017 01:54:15 +0000 Subject: [PATCH] revert: use df instead of mount, and check for the disk that /boot is on, rather than / I thought this was a problem last time, but I was wrong, so reverting the df concept here --- xCAT/postscripts/configefi | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/xCAT/postscripts/configefi b/xCAT/postscripts/configefi index 2ab49bdfa..2473d9c0b 100644 --- a/xCAT/postscripts/configefi +++ b/xCAT/postscripts/configefi @@ -21,7 +21,7 @@ if [ "$arch" = "x86_64" ]; then elif [ -f "/boot/efi/EFI/redhat/grubx64.efi" ];then efibootmgr -c -l \\EFI\\redhat\\grubx64.efi -L syscloneLinux - boot_root=`df /boot | awk '{print $1}' | tail -n 1` + boot_root=`mount | grep -E ' on\s+/ type ' | awk '{print $1}'` sed -i 's| root=\S*| root='$boot_root' net.ifnames=0|' /boot/efi/EFI/redhat/grub.cfg blkid -c /dev/null |grep UUID|while read str_line @@ -52,10 +52,10 @@ if [ "$arch" = "x86_64" ]; then boot_device='' if [ -f "/etc/systemconfig/systemconfig.conf" ];then #boot_root=`cat /etc/systemconfig/systemconfig.conf | grep ROOTDEV | awk '{print $3}'` - boot_root=`df /boot | awk '{print $1}' | tail -n 1` + boot_root=`mount | grep -E ' on\s+/ type ' | awk '{print $1}'` boot_device=`cat /etc/systemconfig/systemconfig.conf | grep BOOTDEV | awk '{print $3}'` else - boot_root=`df /boot | awk '{print $1}' | tail -n 1` + boot_root=`mount | grep -E ' on\s+/ type ' | awk '{print $1}'` boot_device=`echo $boot_root | sed -e 's/[0-9]*$//'` #str_temp=`mount | awk '{print $1","$3}'`