2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-08-26 13:10:35 +00:00

fix #1093, powerkvm, diskfull, enable the pre-script log can be saved to the CN

This commit is contained in:
penguhyang
2016-05-24 07:07:42 -04:00
parent fd4666a09e
commit 55eb1f2840
2 changed files with 17 additions and 11 deletions

View File

@@ -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

View File

@@ -1,3 +1,8 @@
export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#"
if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then
set -x
fi
#find first available block device (sda or vda likely)
#TODO: pick a likely non-SAN target if possible
@@ -18,4 +23,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