From 364e652e59622e0bf55267185e06393486382fdb Mon Sep 17 00:00:00 2001 From: phamt Date: Fri, 8 Feb 2013 20:42:26 +0000 Subject: [PATCH] Fixed update to udev rules for zFCP devices. git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/branches/2.8@15119 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 72a8ac54f..657d9ff9e 100644 --- a/xCAT-server/lib/xcat/plugins/zvm.pm +++ b/xCAT-server/lib/xcat/plugins/zvm.pm @@ -1217,7 +1217,7 @@ sub changeVM { } $out = xCAT::zvmUtils->rExecute($::SUDOER, $node, "echo 0x$wwpn:0x$lun >> /etc/sysconfig/hardware/hwcfg-zfcp-bus-ccw-0.0.$device"); - } elsif ( $os =~ m/sles11/i ) { + } elsif ( $os =~ m/sles11/i ) { $out = `ssh $::SUDOER\@$node "$::SUDO zfcp_disk_configure 0.0.$device $wwpn $lun 1"`; if ($out) { xCAT::zvmUtils->printLn($callback, "$node: $out"); @@ -1225,7 +1225,7 @@ sub changeVM { $tmp = "'ACTION==\"add\", KERNEL==\"rport-*\", ATTR{port_name}==\"0x$wwpn\", SUBSYSTEMS==\"ccw\", KERNELS==\"0.0.$device\", ATTR{[ccw/0.0.$device]0x$wwpn/unit_add}=\"0x$lun\"'"; $tmp = xCAT::zvmUtils->replaceStr($tmp, '"', '\\"'); - $out = xCAT::zvmUtils->rExecute($::SUDOER, $node, "echo $tmp >> /etc/udev/rules.d/51-zfcp-0.0.$device.rules"); + $out = `ssh $::SUDOER\@$node "echo $tmp | $::SUDO tee -a /etc/udev/rules.d/51-zfcp-0.0.$device.rules"`; } elsif ( $os =~ m/rhel/i ) { $out = xCAT::zvmUtils->rExecute($::SUDOER, $node, "echo \"0.0.$device 0x$wwpn 0x$lun\" >> /etc/zfcp.conf");