From 9af0a72bfcad749e41b82831d07196870bc56321 Mon Sep 17 00:00:00 2001 From: phamt Date: Fri, 28 Jun 2013 18:14:52 +0000 Subject: [PATCH] Changed tabs to spaces. Fixed error in xcatconf4z script. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@16819 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/zvm.pm | 28 +++++++++++------------ xCAT-server/share/xcat/scripts/xcatconf4z | 4 +++- 2 files changed, 17 insertions(+), 15 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/zvm.pm b/xCAT-server/lib/xcat/plugins/zvm.pm index e2b4108b4..2b21e1fbc 100644 --- a/xCAT-server/lib/xcat/plugins/zvm.pm +++ b/xCAT-server/lib/xcat/plugins/zvm.pm @@ -6800,8 +6800,8 @@ sub changeHypervisor { my $tgtSize; if ($useWwpnLun) { my $tgtDiskRef = xCAT::zvmUtils->findzFcpDeviceAttr($::SUDOER, $hcp, $pool, $tgtWwpn, $tgtLun); - my %tgtDisk = %$tgtDiskRef; - if (!defined($tgtDisk{'lun'}) && !$tgtDisk{'lun'}) { + my %tgtDisk = %$tgtDiskRef; + if (!defined($tgtDisk{'lun'}) && !$tgtDisk{'lun'}) { xCAT::zvmUtils->printLn( $callback, "$node: (Error) Target zFCP device $tgtWwpn/$tgtLun does not exists" ); return; } @@ -6910,12 +6910,12 @@ sub changeHypervisor { my %criteria = ( 'status' => $srcDisk{'status'}, 'wwpn' => $srcDisk{'wwpn'}, - 'lun' => $srcDisk{'lun'}, - 'size' => $srcDisk{'size'}, - 'range' => $srcDisk{'range'}, - 'owner' => $srcDisk{'owner'}, - 'fcp' => $srcDisk{'fcp'}, - 'tag' => $srcDisk{'tag'} + 'lun' => $srcDisk{'lun'}, + 'size' => $srcDisk{'size'}, + 'range' => $srcDisk{'range'}, + 'owner' => $srcDisk{'owner'}, + 'fcp' => $srcDisk{'fcp'}, + 'tag' => $srcDisk{'tag'} ); my $resultsRef = xCAT::zvmUtils->findAndUpdatezFcpPool($callback, $node, $::SUDOER, $hcp, $pool, \%criteria); my %results = %$resultsRef; @@ -7380,12 +7380,12 @@ sub changeHypervisor { # Go through each LUN foreach (@luns) { - my %criteria = ( - 'status' => 'free', - 'wwpn' => $wwpn, - 'lun' => $_ - ); - + my %criteria = ( + 'status' => 'free', + 'wwpn' => $wwpn, + 'lun' => $_ + ); + my $resultsRef = xCAT::zvmUtils->findAndUpdatezFcpPool($callback, $node, $::SUDOER, $hcp, $pool, \%criteria); my %results = %$resultsRef; if ($results{'rc'} == 0) { diff --git a/xCAT-server/share/xcat/scripts/xcatconf4z b/xCAT-server/share/xcat/scripts/xcatconf4z index c8c6eb70e..605433dfa 100644 --- a/xCAT-server/share/xcat/scripts/xcatconf4z +++ b/xCAT-server/share/xcat/scripts/xcatconf4z @@ -16,7 +16,7 @@ ############################################################################### # Authorized senders of configuration files listed here. Specify a list a -# blank delimitted list of userids with each userid in uppercase +# blank delimited list of userids with each userid in uppercase # (e.g. "ZHCP" or "ZHCP ZHCP2"), or '*' to indicate all are authorized. # If nothing is specified then this function will not process any # configuration files in the reader. @@ -77,6 +77,7 @@ function onlineDevice { if (( rc != 0 )); then if [[ -e /sbin/cio_ignore ]]; then rc=$(/sbin/cio_ignore -r 0.0.$device > /dev/null; echo $?) + which udevadm &> /dev/null && udevadm settle || udevsettle fi rc=$(/sbin/chccwdev -e $device > /dev/null; echo $?) if (( rc != 0 )); then @@ -84,6 +85,7 @@ function onlineDevice { return 1 fi fi + which udevadm &> /dev/null && udevadm settle || udevsettle return 0 }