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:
@ -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
|
||||
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user