From 09361d8499409aa5656c7929db351d18cee0b5cc Mon Sep 17 00:00:00 2001 From: Yuan Bai Date: Fri, 12 May 2017 13:01:44 +0800 Subject: [PATCH] update udevadmin work around (#3038) --- xCAT-server/share/xcat/install/scripts/getinstdisk | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/xCAT-server/share/xcat/install/scripts/getinstdisk b/xCAT-server/share/xcat/install/scripts/getinstdisk index 743b991b1..311a7294d 100644 --- a/xCAT-server/share/xcat/install/scripts/getinstdisk +++ b/xCAT-server/share/xcat/install/scripts/getinstdisk @@ -145,13 +145,10 @@ if [ -z "$install_disk" ]; then # 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 - exec 42>&1 - anaconda_version=$(anaconda --version 2>&1 >&42) - exec 42>&- cpu_model=$(awk '/model/ { print $NF }' /proc/cpuinfo) p9_bool=$(grep POWER9 /proc/cpuinfo|head -n 1|awk '{print $3}') - if [ "$anaconda_version" == "anaconda 21.48.22.93-1" -a \ - "$cpu_model" == "0000000000000000" -a "$p9_bool" == "POWER9" ]; then + 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"'|