On Linux there are a group of scripts in /opt/xcat./share/xcat/install/scripts that are used to generate the /tmp/mypostscript for full disk installs.
The scripts are written for each OS and versions of OS. A lot of code is common.
1) Extract the common code for generating the mypostscript file and make it common across all scripts
2) Move the creation of the mypostscript file from /tmp/mypostscript to /xcatpost/mypostscript
3) Change the logic in the run_ps routine as appropriate for the changes above.
4) If not already done, add timestamps on the running of the postscripts and start and stop headers in /var/log/xcat/xcat.log