mirror of
https://github.com/xcat2/xcat-core.git
synced 2025-06-18 12:20:40 +00:00
turn off logging every single line of a shell script
This commit is contained in:
@ -2,9 +2,12 @@
|
||||
<script>
|
||||
<filename>boot.sh</filename>
|
||||
<interpreter>shell</interpreter>
|
||||
<debug config:type="boolean">false</debug>
|
||||
<source>
|
||||
|
||||
<![CDATA[
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p /mnt/var/log/xcat/
|
||||
{
|
||||
|
||||
@ -12,7 +15,10 @@ cat /tmp/pre-install.log >> /mnt/var/log/xcat/xcat.log
|
||||
|
||||
echo "Running AutoYaST Chroot-Installation script..."
|
||||
|
||||
#!/bin/sh
|
||||
export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#"
|
||||
if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
AWK=`find / -name awk | head -1`
|
||||
#old awk /mounts/instsys/bin/awk -f
|
||||
@ -76,6 +82,10 @@ elif [[ `echo "$PRINIC" | grep -sqE ^[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-Fa-f0-9]+:[A-F
|
||||
export PRINIC=`ip -o link|grep -i "$PRINIC"|awk '{print $2}'|sed s/://`
|
||||
fi
|
||||
echo 'export PRINIC='"$PRINIC" > /mnt/tmp/prinicsetting
|
||||
|
||||
if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then
|
||||
set +x
|
||||
fi
|
||||
} >>/mnt/var/log/xcat/xcat.log 2>&1
|
||||
]]>
|
||||
|
||||
|
@ -1,10 +1,13 @@
|
||||
#!/bin/sh
|
||||
|
||||
|
||||
export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#"
|
||||
export MASTER_IP="#ENV:MASTER_IP#"
|
||||
#INCLUDE:#ENV:XCATROOT#/share/xcat/install/scripts/scriptlib#
|
||||
|
||||
if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
export MANAGEDADDRESSMODE=#MANAGEDADDRESSMODE#
|
||||
|
||||
cd /etc/sysconfig/network
|
||||
@ -63,3 +66,6 @@ if [ "$XCATDEBUGMODE" != "0" ]; then
|
||||
fi
|
||||
/sbin/portmap
|
||||
|
||||
if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then
|
||||
set +x
|
||||
fi
|
||||
|
@ -2,6 +2,7 @@
|
||||
<script>
|
||||
<filename>xcat.sh</filename>
|
||||
<interpreter>shell</interpreter>
|
||||
<debug config:type="boolean">false</debug>
|
||||
<source>
|
||||
|
||||
<![CDATA[
|
||||
|
@ -2,13 +2,19 @@
|
||||
<script>
|
||||
<filename>foo.sh</filename>
|
||||
<interpreter>shell</interpreter>
|
||||
<debug config:type="boolean">false</debug>
|
||||
<source>
|
||||
|
||||
<![CDATA[
|
||||
#!/bin/sh
|
||||
|
||||
{
|
||||
echo "Running AutoYaST Pre-Installation script..."
|
||||
|
||||
#!/bin/sh
|
||||
export XCATDEBUGMODE="#TABLEBLANKOKAY:site:key=xcatdebugmode:value#"
|
||||
if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then
|
||||
set -x
|
||||
fi
|
||||
|
||||
AWK=`find / -name awk | tail -1`
|
||||
#old awk /mounts/instsys/bin/awk -f
|
||||
@ -163,6 +169,10 @@ 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
|
||||
|
||||
if [ "$XCATDEBUGMODE" = "1" ] || [ "$XCATDEBUGMODE" = "2" ]; then
|
||||
set +x
|
||||
fi
|
||||
} >>/tmp/pre-install.log 2>&1
|
||||
]]>
|
||||
|
||||
|
Reference in New Issue
Block a user