mirror of
				https://github.com/xcat2/xcat-core.git
				synced 2025-11-04 13:22:36 +00:00 
			
		
		
		
	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
This commit is contained in:
		@@ -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
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user