2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-03 03:50:08 +00:00

Remove trailing spaces in file xCAT/postscripts/configefi

This commit is contained in:
GONG Jie 2017-12-31 23:59:59 +00:00
parent d34f2bcd2d
commit 942dd426bf

View File

@ -20,20 +20,20 @@ if [ "$arch" = "x86_64" ]; then
#support for redhat 7.0
elif [ -f "/boot/efi/EFI/redhat/grubx64.efi" ];then
efibootmgr -c -l \\EFI\\redhat\\grubx64.efi -L syscloneLinux
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
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
do
partition=`echo "$str_line"|grep UUID|awk '{print $1}'|sed -e 's|/dev/\(.*\):|\1|g'`
#echo "partition=$partition"
if echo "$partition"|grep /; then
continue
fi
newuuid=`blkid -c /dev/null|grep "$partition"|sed -e 's|.*UUID="\(.*\)" T.*|\1|g'`
newuuid=`blkid -c /dev/null|grep "$partition"|sed -e 's|.*UUID="\(.*\)" T.*|\1|g'`
#echo "newuuid=$newuuid"
sed -i '/'$partition'/s|UUID=\S*|UUID='$newuuid'|' /etc/fstab
done
@ -117,7 +117,7 @@ elif [ "$arch" = "ppc64" ]; then
echo "Using /usr/lib/yaboot/yaboot"
echo "dd if=/usr/lib/yaboot/yaboot of=/dev/sda1 bs=4096"
dd if=/usr/lib/yaboot/yaboot of=/dev/sda1 bs=4096
# Set 0x41 as the partition type of the first partition
# echo A | dd of=/dev/sda bs=1 count=1 seek=450
elif [ -f "/lib/lilo/pmac/yaboot" ]; then
@ -151,7 +151,7 @@ elif [ "$arch" = "ppc64" ]; then
done
else
echo "Can not find boot loader"
fi
fi
else
echo "[ERROR]: unsupport arch....."
fi