diff --git a/xCAT-server/share/xcat/install/pkvm/compute.pkvm3.ppc64le.tmpl b/xCAT-server/share/xcat/install/pkvm/compute.pkvm3.ppc64le.tmpl index 217b5544d..ca50f7631 100644 --- a/xCAT-server/share/xcat/install/pkvm/compute.pkvm3.ppc64le.tmpl +++ b/xCAT-server/share/xcat/install/pkvm/compute.pkvm3.ppc64le.tmpl @@ -36,22 +36,21 @@ rootpw --iscrypted #CRYPT:passwd:key=system,username=root:password# %pre { -set -x -touch "/startpre" +echo "Running Automated Network Pre-Installation script..." #add the code to determine the disk to partition here #default is /dev/sda #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.pkvm3# -} >>/tmp/prelog 2>&1 +} >>/tmp/pre-install.log 2>&1 %end %post -touch "/startpost" - +mkdir -p /var/log/xcat/ +{ +cat >> /var/log/xcat/xcat.log << "EOF" +%include /tmp/pre-install.log +EOF +echo "Running Automated Network Post-Installation script..." #INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.xcat# -touch "/inpost" - -#sleep 1000000 - - +} >>/var/log/xcat/xcat.log 2>&1 %end diff --git a/xCAT-server/share/xcat/install/scripts/pre.pkvm3 b/xCAT-server/share/xcat/install/scripts/pre.pkvm3 index 2e7df51a0..266a19a75 100755 --- a/xCAT-server/share/xcat/install/scripts/pre.pkvm3 +++ b/xCAT-server/share/xcat/install/scripts/pre.pkvm3 @@ -1,3 +1,12 @@ +export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#" +if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then + set -x +fi + +if [ "$XCATDEBUGMODE" = "2" ]; then + echo 'root:cluster' | chpasswd +fi + #find first available block device (sda or vda likely) #TODO: pick a likely non-SAN target if possible @@ -15,4 +24,6 @@ fi echo "part PV.01 --ondisk=$instdisk" >> /tmp/partitioning echo "volgroup ibmpkvm_rootvg PV.01" >> /tmp/partitioning - +if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then + set +x +fi