On Thu, 02 Aug 2012 14:51:05 Guang Cheng Li wrote:
> the run_ps() subroutine is not generated by /xcatpost/getpostscript.awk,
> you can see in the autoyast "Run xCAT post install" section that the run_ps
> is generated using the sed commands, might there be some problem when the "
> Run xCAT post install" section tries to parse and update the mypostscript? 
> Here is the code, I guess you can run these commands manually on the
> problematic nodes to see if there is any error.
> 
> # use the run_ps subroutine to run the postscripts
> TMP=`sed "/postscripts-start-here/,/postscripts-end-here/ s/\(.*\)/run_ps
> \1/;s/run_ps\s*#/#/;s/run_ps\s*$//" /xcatpost/mypostscript`
> echo "
> # subroutine used to run postscripts
> run_ps () {
>  logdir=\"/var/log/xcat\"
>  mkdir -p \$logdir
>  logfile=\"/var/log/xcat/xcat.log\"
> 
>  if [ -f \$1 ]; then
>   echo "\"\`date\` Running postscript: \$@\"" | tee -a \$logfile
>   #./\$@ 2>&1 1> /tmp/tmp4xcatlog
>   #cat /tmp/tmp4xcatlog | tee -a \$logfile
>   ./\$@ 2>&1 | tee -a $logfile
>  else
>   echo "\"\`date\` Postscript \$1 does NOT exist.\"" | tee -a \$logfile
>  fi
> }
> # subroutine end
> 
> " > /xcatpost/mypostscript
> echo "$TMP" >> /xcatpost/mypostscript
> TMP=`sed "/postbootscripts-start-here/,/postbootscripts-end-here/
> s/\(.*\)/run_ps \1/;s/run_ps\s*#/#/;s/run_ps\s*$//" /xcatpost/mypostscript`
> echo "$TMP" > /xcatpost/mypostscript
> 
> 
> #save the postboot scripts to /xcatpost/mypostscript.post
> TMP=`sed "/postscripts-start-here/,/postscripts-end-here/
> d" /xcatpost/mypostscript`
> echo "$TMP" > /xcatpost/mypostscript.post
> chmod 755 /xcatpost/mypostscript.post
> 
> 
Sorry for taking so long I have been kept busy with other things.
There is no section in the autoyast file that cointains the lines
which generates the run_ps() subroutine so of course they are not 
executed. In fact I cannot find traces of run_ps in any of the script
samples in /opt/xcat/share/xcat/install.

Francois

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
xCAT-user mailing list
xCAT-user@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/xcat-user

Reply via email to