From 9d2eee0d0b72fe6dd722eeeed4edee65a33b8383 Mon Sep 17 00:00:00 2001 From: Jarrod Johnson Date: Mon, 7 Dec 2020 07:55:31 -0500 Subject: [PATCH] Fix mismatch for other 'size' attributes There may be multiple attributes with the word 'size' in it, correct by matching the whole key value by including the containing {} characters. --- xCAT-server/share/xcat/install/scripts/getinstdisk | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xCAT-server/share/xcat/install/scripts/getinstdisk b/xCAT-server/share/xcat/install/scripts/getinstdisk index 14c232748..48f07d97a 100644 --- a/xCAT-server/share/xcat/install/scripts/getinstdisk +++ b/xCAT-server/share/xcat/install/scripts/getinstdisk @@ -44,7 +44,7 @@ if [ -z "$install_disk" ]; then # Classify entries by DEVTYPE for entry in $entries; do - DEVSIZE=$(udevadm info --attribute-walk --name=$entry|grep size| sed -e 's/[^"]*"//' -e 's/"//'|tail -n 1) + DEVSIZE=$(udevadm info --attribute-walk --name=$entry|grep {size}| sed -e 's/[^"]*"//' -e 's/"//'|tail -n 1) if [ -z "$DEVSIZE" -o $DEVSIZE -lt 262144 ]; then # ignore small devices, that are likely remote media or similar continue