mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-22 03:32:04 +00:00
Merge pull request #2547 from ocfplc/fix_configefi
revert: use df instead of mount, and check for the disk that /boot is…
This commit is contained in:
commit
65aff25a97
@ -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}'`
|
||||
|
Loading…
x
Reference in New Issue
Block a user