2
0
mirror of https://github.com/xcat2/xcat-core.git synced 2025-06-21 05:25:32 +00:00

Merge pull request #1200 from penguhyang/powerkvm_diskfull_log_to_cn

fix #1093, powerkvm, diskfull, enable the pre-script log can be saved to the CN
This commit is contained in:
yangsong
2016-06-15 00:48:25 -05:00
committed by GitHub
2 changed files with 21 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,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