From 441e292e0878ec78efd64efb01d04ab54e178b55 Mon Sep 17 00:00:00 2001 From: phamt Date: Tue, 5 Feb 2013 02:03:53 +0000 Subject: [PATCH] Allow multiple WWPNs to be specified. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15050 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/zvm.pm | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/zvm.pm b/xCAT-server/lib/xcat/plugins/zvm.pm index 95aea644e..96c350a40 100644 --- a/xCAT-server/lib/xcat/plugins/zvm.pm +++ b/xCAT-server/lib/xcat/plugins/zvm.pm @@ -6108,8 +6108,8 @@ sub changeHypervisor { } if (!(`ssh $::SUDOER\@$hcp "$::SUDO test -e $::ZFCPPOOL/$pool.conf && echo Exists"`)) { - # Create pool configuration file - $out = `ssh $::SUDOER\@$hcp "$::SUDO echo '#status,wwpn,lun,size,range,owner,channel,tag' > $::ZFCPPOOL/$pool.conf"`; + # Create pool configuration file + $out = xCAT::zvmUtils->rExecute($::SUDOER, $hcp, "echo '#status,wwpn,lun,size,range,owner,channel,tag' > $::ZFCPPOOL/$pool.conf"); xCAT::zvmUtils->printLn( $callback, "$node: New zFCP device pool $pool created" ); } @@ -6128,7 +6128,9 @@ sub changeHypervisor { } # Update file with given WWPN, LUN, size, and owner - $out = `ssh $::SUDOER\@$hcp "$::SUDO echo \"$status,$wwpn,$lun,$size,$range,$owner,,\" >> $::ZFCPPOOL/$pool.conf"`; + my $entry = "'" . "$status,$wwpn,$lun,$size,$range,$owner,," . "'"; + $out = `ssh $::SUDOER\@$hcp "$::SUDO echo $entry >> $::ZFCPPOOL/$pool.conf"`; + xCAT::zvmUtils->printLn( $callback, "ssh $::SUDOER\@$hcp \"$::SUDO echo \"$status,$wwpn,$lun,$size,$range,$owner,,\" >> $::ZFCPPOOL/$pool.conf"); xCAT::zvmUtils->printLn( $callback, "$node: Adding zFCP device to $pool pool... Done" ); $out = ""; } @@ -6251,7 +6253,7 @@ sub changeHypervisor { } # Update file with given WWPN, LUN, size, and owner - $out = `ssh $::SUDOER\@$hcp "$::SUDO sed --in-place -e /$entry/d $::ZFCPPOOL/$pool.conf"`; + $out = xCAT::zvmUtils->rExecute($::SUDOER, $hcp, "sed --in-place -e /$entry/d $::ZFCPPOOL/$pool.conf"); if ($wwpn) { xCAT::zvmUtils->printLn( $callback, "$node: Removing zFCP device $wwpn/$_ from $pool pool... Done" ); } else {