From 6f8f0eac9ec101aa09a40b79025144c15724fecc Mon Sep 17 00:00:00 2001 From: jbjohnso Date: Tue, 5 Feb 2013 14:55:59 +0000 Subject: [PATCH] Have screenlog.0 be created by default Change bmcsetup to not blindly give up on lan channel 16 git-svn-id: https://svn.code.sf.net/p/xcat/code/xcat-core/trunk@15060 8638fb3e-16cb-4fca-ae20-7b5d299a9bcd --- xCAT-genesis-builder/xcat-cmdline.sh | 2 +- xCAT-genesis-scripts/bin/bmcsetup | 18 +++++++++++++----- 2 files changed, 14 insertions(+), 6 deletions(-) diff --git a/xCAT-genesis-builder/xcat-cmdline.sh b/xCAT-genesis-builder/xcat-cmdline.sh index 00914979e..c0ce5b519 100644 --- a/xCAT-genesis-builder/xcat-cmdline.sh +++ b/xCAT-genesis-builder/xcat-cmdline.sh @@ -24,4 +24,4 @@ if grep console=ttyS /proc/cmdline > /dev/null; then while :; do sleep 1; screen -x console < /dev/tty1 > /dev/tty1 2>&1; clear; done & fi while :; do screen -ln < /dev/tty2 > /dev/tty2 2>&1; done & -while :; do screen -ln doxcat; done +while :; do screen -L -ln doxcat; done diff --git a/xCAT-genesis-scripts/bin/bmcsetup b/xCAT-genesis-scripts/bin/bmcsetup index 3ede13582..f98dca335 100755 --- a/xCAT-genesis-scripts/bin/bmcsetup +++ b/xCAT-genesis-scripts/bin/bmcsetup @@ -95,11 +95,19 @@ elif [ "$IPMIMFG" == "47488" ]; then fi echo -n "Auto detecting LAN channel..." -for LANCHAN in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do - if ipmitool channel info $LANCHAN 2> /dev/null | grep 802.3 > /dev/null 2>&1 && ipmitool raw 0xc 2 $LANCHAN 5 0 0 > /dev/null 2>&1; - then break; - fi; - echo -n "." +while [ -z "$LANCHAN" ]; do + for TLANCHAN in 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16; do + if ipmitool channel info $TLANCHAN 2> /dev/null | grep 802.3 > /dev/null 2>&1 && ipmitool raw 0xc 2 $TLANCHAN 5 0 0 > /dev/null 2>&1; + then + LANCHAN=$TLANCHAN + break; + fi; + echo -n "." + done + if [ -z "$LANCHAN" ]; then + echo "Unable to detect lan channel, retrying in 10 seconds"; + sleep 10 + fi done echo "Detected LAN channel $LANCHAN"