diff --git a/xCAT-server/lib/xcat/plugins/updatenode.pm b/xCAT-server/lib/xcat/plugins/updatenode.pm index 7295b26b7..df3502b21 100644 --- a/xCAT-server/lib/xcat/plugins/updatenode.pm +++ b/xCAT-server/lib/xcat/plugins/updatenode.pm @@ -1267,6 +1267,7 @@ sub updatenoderunps # Note order of parameters to xcatdsklspost #is important and cannot be changed my $runpscmd; + if ($::SETSERVER){ $runpscmd = "$installdir/postscripts/xcatdsklspost $mode -M $snkey '$postscripts' --tftp $tftpdir --installdir $installdir --nfsv4 $nfsv4 -c"; @@ -1274,6 +1275,11 @@ sub updatenoderunps $runpscmd = "$installdir/postscripts/xcatdsklspost $mode -m $snkey '$postscripts' --tftp $tftpdir --installdir $installdir --nfsv4 $nfsv4 -c" } + # add verbose flag + if ($::VERBOSE){ + $runpscmd .= " -V"; + } + push @$args1,"--nodestatus"; # return nodestatus if (defined($::fanout)) { # fanout push @$args1,"-f" ; @@ -1596,6 +1602,10 @@ sub updatenodesoftware $cmd = "$installdir/postscripts/xcatdsklspost 2 -m $snkey 'ospkgs,otherpkgs' --tftp $tftpdir"; } + # add verbose flag + if ($::VERBOSE){ + $cmd .= " -V"; + } # build xdsh command push @$args1,"--nodestatus"; # return nodestatus diff --git a/xCAT/postscripts/xcatdsklspost b/xCAT/postscripts/xcatdsklspost index 62d795f02..7f110eaf4 100755 --- a/xCAT/postscripts/xcatdsklspost +++ b/xCAT/postscripts/xcatdsklspost @@ -3,8 +3,8 @@ ##################################################### # # Generic xCAT post script for diskless nodes -# The syntax of this script -# xcatdsklspost {mode} {-m|-M} [postscripts] +# The syntax of this script: +# xcatdsklspost {mode} {-m|-M} [postscripts] --tftp /tftpboot --installdir /install --nfsv4 no -c -V # This script is called in the following different places: # updatenode -P ... --> xcatdsklspost 1 -m/-M ... # updatenode -S --> xcatdsklspost 2 -m/-M otherpkgs @@ -169,15 +169,19 @@ else fi fi if [ $ARGNUM -gt 10 ]; then - if [ $11 = "-c" ]; then + if [ ${11} = "-c" ]; then CFLAG=${11} fi fi + if [ $ARGNUM -gt 11 ]; then + if [ ${12} = "-V" ]; then + export VERBOSE=1 + fi + fi ;; 3|4|6) MODE=$1;; esac fi - # set the default path for the xcatpost directory xcatpost="/xcatpost" # Check for debug mode and you have nodename available you can change the path for debug @@ -203,8 +207,8 @@ if [ ! `uname` = Linux ]; then umount /xcatmnt rmdir /xcatmnt logger -t xCAT -p local4.err "Running xcataixpost $*" - echo "/$xcatpost/xcataixpost $1 $2 $3 '"$4"' $5 $6 $7 $8 $9 ${10} ${11}" - exec /$xcatpost/xcataixpost $1 $2 $3 "$4" $5 $6 $7 $8 $9 ${10} ${11} + echo "/$xcatpost/xcataixpost $1 $2 $3 '"$4"' $5 $6 $7 $8 $9 ${10} ${11} ${12}" + exec /$xcatpost/xcataixpost $1 $2 $3 "$4" $5 $6 $7 $8 $9 ${10} ${11} ${12} exit fi