From 0df98e654c340a7b10a6723c2732ad6ccc196bd9 Mon Sep 17 00:00:00 2001 From: phamt Date: Fri, 5 Apr 2013 02:35:29 +0000 Subject: [PATCH] Fixed grep to be case insensitive and find SCSI device using both WPN and LUN, instead of just LUN. A WPN and LUN uniquely identify a device. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15836 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/zvm.pm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/zvm.pm b/xCAT-server/lib/xcat/plugins/zvm.pm index 59c870348..479c54e55 100644 --- a/xCAT-server/lib/xcat/plugins/zvm.pm +++ b/xCAT-server/lib/xcat/plugins/zvm.pm @@ -1296,7 +1296,7 @@ sub changeVM { # Mark WWPN and LUN as used and set the owner/channel # This config file keeps track of the owner of each device, which is useful in nodeset $size = $size . "M"; - my $select = `ssh $::SUDOER\@$hcp "$::SUDO cat $::ZFCPPOOL/$pool.conf" | grep $lun`; + my $select = `ssh $::SUDOER\@$hcp "$::SUDO cat $::ZFCPPOOL/$pool.conf" | egrep -i $wwpn | egrep -i $lun`; chomp($select); if ($select) { @info = split(',', $select); @@ -1902,7 +1902,7 @@ sub changeVM { my $pool; my $tmp; foreach (@pools) { - $tmp = `ssh $::SUDOER\@$hcp "$::SUDO cat $::ZFCPPOOL/$_" | egrep -i $lun`; + $tmp = `ssh $::SUDOER\@$hcp "$::SUDO cat $::ZFCPPOOL/$_" | egrep -i $wwpn | egrep -i $lun`; chomp($tmp); if ($tmp) { # Mark WWPN and LUN as free and delete owner/channel