2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-05-29 17:23:08 +00:00

disk names might be sd[a-z]+

This commit is contained in:
immarvin 2015-11-23 08:50:34 -05:00
parent f53f3854e3
commit 340516c2c3

View File

@ -5,7 +5,7 @@ shopt -s nullglob
#first take the disk with the MAX WWN numer to be the installdisk
if [ -z "$instdisk" ]; then
disks=$(awk -F' ' '{print $4 }' /proc/partitions |grep -e "sd[a-z]$")
disks=$(awk -F' ' '{print $4 }' /proc/partitions |grep -e "sd[a-z]+$")
for disk in $disks; do
diskinfo=$(udevadm info --name $disk)
diskname=$(IFS= ;echo $diskinfo|grep '\<DEVNAME\>'|cut -d "=" -f2|tr A-Z a-z)