mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-05-30 09:36:41 +00:00
Merge pull request #764 from penguhyang/pre_script_logging
logging the pre-script to make debug easy
This commit is contained in:
commit
c26c76a193
@ -146,9 +146,16 @@ reboot
|
||||
%packages
|
||||
#INCLUDE_DEFAULT_PKGLIST#
|
||||
%pre
|
||||
{
|
||||
echo "Running Kickstart Pre-Installation script..."
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.rh#
|
||||
} >>/tmp/pre-install.log 2>&1
|
||||
%post
|
||||
mkdir -p /var/log/xcat/
|
||||
{
|
||||
cat >> /var/log/xcat/xcat.log << "EOF"
|
||||
%include /tmp/pre-install.log
|
||||
EOF
|
||||
echo "Running Kickstart Post-Installation script..."
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.rh#
|
||||
} >>/var/log/xcat/xcat.log 2>&1
|
||||
|
@ -149,10 +149,17 @@ reboot
|
||||
%packages
|
||||
#INCLUDE_DEFAULT_PKGLIST#
|
||||
%pre
|
||||
{
|
||||
echo "Running Kickstart Pre-Installation script..."
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.rh#
|
||||
} >>/tmp/pre-install.log 2>&1
|
||||
%post
|
||||
mkdir -p /var/log/xcat/
|
||||
{
|
||||
cat >> /var/log/xcat/xcat.log << "EOF"
|
||||
%include /tmp/pre-install.log
|
||||
EOF
|
||||
echo "Running Kickstart Post-Installation script..."
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.rh#
|
||||
} >>/var/log/xcat/xcat.log 2>&1
|
||||
|
||||
|
@ -147,11 +147,18 @@ reboot
|
||||
#INCLUDE_DEFAULT_PKGLIST#
|
||||
%end
|
||||
%pre
|
||||
{
|
||||
echo "Running Kickstart Pre-Installation script..."
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/pre.rh.rhels7#
|
||||
} >>/tmp/pre-install.log 2>&1
|
||||
%end
|
||||
%post
|
||||
mkdir -p /var/log/xcat/
|
||||
{
|
||||
cat >> /var/log/xcat/xcat.log << "EOF"
|
||||
%include /tmp/pre-install.log
|
||||
EOF
|
||||
echo "Running Kickstart Post-Installation script..."
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.xcat#
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.rhels7#
|
||||
} >>/var/log/xcat/xcat.log 2>&1
|
||||
|
@ -7,6 +7,11 @@
|
||||
<![CDATA[
|
||||
mkdir -p /mnt/var/log/xcat/
|
||||
{
|
||||
|
||||
cat /tmp/pre-install.log >> /mnt/var/log/xcat/xcat.log
|
||||
|
||||
echo "Running AutoYaST Chroot-Installation script..."
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
AWK=`find / -name awk | head -1`
|
||||
|
@ -7,6 +7,7 @@
|
||||
<![CDATA[
|
||||
mkdir -p /var/log/xcat/
|
||||
{
|
||||
echo "Running AutoYaST Post-Installation script..."
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.sles.common#
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/post.xcat#
|
||||
} >>/var/log/xcat/xcat.log 2>&1
|
||||
|
@ -1,3 +1,9 @@
|
||||
export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#"
|
||||
if [ "$XCATDEBUGMODE" != "0" ] && [ "$XCATDEBUGMODE" != "" ]
|
||||
then
|
||||
set -x
|
||||
fi
|
||||
|
||||
if grep n8r /proc/cmdline > /dev/null 2>&1;
|
||||
then
|
||||
stty crtscts
|
||||
@ -200,4 +206,7 @@ NEXTSERVER=${NEXTSERVER%%:*}
|
||||
export nextserver=$NEXTSERVER
|
||||
#INSTALL_SOURCES_IN_PRE#
|
||||
|
||||
|
||||
if [ "$XCATDEBUGMODE" != "0" ] && [ "$XCATDEBUGMODE" != "" ]
|
||||
then
|
||||
set +x
|
||||
fi
|
||||
|
@ -5,6 +5,9 @@
|
||||
<source>
|
||||
|
||||
<![CDATA[
|
||||
{
|
||||
echo "Running AutoYaST Pre-Installation script..."
|
||||
|
||||
#!/bin/sh
|
||||
|
||||
AWK=`find / -name awk | tail -1`
|
||||
@ -160,6 +163,7 @@ fi
|
||||
export nextserver=`cat /proc/cmdline | grep http | awk -F'autoyast=http://' {'print \$2'} | awk -F':' {'print \$1'}`
|
||||
cp /tmp/profile/modified.xml /tmp/profile/modified1.xml
|
||||
sed -e 's!<software>!<add-on><add_on_products config:type="list">#INSTALL_SOURCES_IN_PRE#</add_on_products></add-on><software>!' /tmp/profile/modified1.xml > /tmp/profile/modified.xml
|
||||
} >>/tmp/pre-install.log 2>&1
|
||||
]]>
|
||||
|
||||
</source>
|
||||
|
Loading…
x
Reference in New Issue
Block a user