mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-29 17:23:08 +00:00
revert to old udevadm code (#3294)
This commit is contained in:
parent
d65bf34296
commit
6720675b21
@ -141,19 +141,8 @@ if [ -z "$install_disk" ]; then
|
||||
disk_wwn=$(echo $output_for_wwn | $utolcmd)
|
||||
output_for_path=$(IFS= ;echo $disk_info | grep DEVPATH | cut -d "=" -f2)
|
||||
disk_path=$(echo $output_for_path | $utolcmd)
|
||||
|
||||
# Work around the issue Pegas running on Power9 installation hang in anaconda
|
||||
# with "TypeError: argument of type 'NoneType' is not iterable",
|
||||
# after running of "udevadm info --attribute-walk --name=/dev/sda" in %pre section of kickstart
|
||||
cpu_model=$(awk '/model/ { print $NF }' /proc/cpuinfo)
|
||||
p9_bool=$(grep POWER9 /proc/cpuinfo|head -n 1|awk '{print $3}')
|
||||
anaconda --version >/dev/null 2>&1
|
||||
if [ $? -eq 0 ] && [ "$cpu_model" = "0000000000000000" ] && [ "$p9_bool" = "POWER9" ]; then
|
||||
disk_driver=""
|
||||
else
|
||||
disk_driver=$(udevadm info --attribute-walk --name=$disk | grep DRIVERS| grep -v '""'| grep -v '"sd"'|
|
||||
disk_driver=$(udevadm info --attribute-walk --name=$disk | grep DRIVERS| grep -v '""'| grep -v '"sd"'|
|
||||
\head -n 1| sed -e 's/[^"]*"//' -e 's/"//' | $utolcmd)
|
||||
fi
|
||||
|
||||
echo "[get_install_disk]The disk $disk information: "
|
||||
echo "[get_install_disk] disk_wwn=$disk_wwn"
|
||||
|
Loading…
x
Reference in New Issue
Block a user