From b175154c9cec9275dcf3613445869ee74dcd40a0 Mon Sep 17 00:00:00 2001 From: lissav Date: Wed, 9 Jan 2013 12:58:43 +0000 Subject: [PATCH] consolidate more code git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@14822 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-server/lib/xcat/plugins/updatenode.pm | 35 ++++++++++------------ 1 file changed, 15 insertions(+), 20 deletions(-) diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index aa3d72a6f..34fe28ee2 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -1197,28 +1197,23 @@ sub updatenoderunps my $args1; # Note order of parameters to xcatdsklspost #is important and cannot be changed - if ($::SETSERVER) - { - $args1 = [ - "--nodestatus", - "-s", - "-v", - "-e", - "$installdir/postscripts/xcatdsklspost $mode -M $snkey '$postscripts' --tftp $tftpdir --installdir $installdir --nfsv4 $nfsv4" - ]; - - } - else - { - - $args1 = [ - "--nodestatus", - "-s", - "-v", - "-e", + my $runpscmd; + if ($::SETSERVER){ + $runpscmd = + "$installdir/postscripts/xcatdsklspost $mode -M $snkey '$postscripts' --tftp $tftpdir --installdir $installdir --nfsv4 $nfsv4"; + } else { + $runpscmd = "$installdir/postscripts/xcatdsklspost $mode -m $snkey '$postscripts' --tftp $tftpdir --installdir $installdir --nfsv4 $nfsv4" - ]; } + + $args1 = [ + "--nodestatus", + "-s", + "-v", + "-e", + "$runpscmd" + ]; + # if -l username input if (defined($::USER)){ # need to add the -l username unshift(@$args1, "$::USER");