From 5ea20a309fb11e31a8077e2bcf307291f7410f36 Mon Sep 17 00:00:00 2001 From: Bill Nottingham Date: Tue, 17 Dec 2002 17:45:38 +0000 Subject: more rhgb tweaks have a loop for checking link state instead of a static 'sleep 5' --- prefdm | 6 ++++++ sysconfig.txt | 5 +++-- sysconfig/network-scripts/network-functions | 12 +++++++++--- 3 files changed, 18 insertions(+), 5 deletions(-) diff --git a/prefdm b/prefdm index 5ff5fd5c..fb55abec 100755 --- a/prefdm +++ b/prefdm @@ -2,6 +2,12 @@ PATH=/sbin:/usr/sbin:/bin:/usr/bin:/usr/X11R6/bin + +# shut down any graphical boot that might exist +if [ -x /usr/bin/rhgb-client ]; then + /usr/bin/rhgb-client -quit +fi + # We need to source this so that the login screens get translated [ -f /etc/profile.d/lang.sh ] && . /etc/profile.d/lang.sh diff --git a/sysconfig.txt b/sysconfig.txt index b0388952..d162ae0d 100644 --- a/sysconfig.txt +++ b/sysconfig.txt @@ -86,9 +86,10 @@ Files in /etc/sysconfig /etc/sysconfig/init: BOOTUP= - BOOTUP=color means new (as of RH6.0) boot display. + BOOTUP=graphical means use X Windows graphical boot up + BOOTUP=color means colorized text mode boot display. BOOTUP=verbose means old style display - Anything else means new display, but without ANSI-formatting + Anything else means simplified display, but without color or ANSI-formatting LOGLEVEL= Sets the initial console logging level for the kernel. The default is 7. 8 means everything (including debugging); diff --git a/sysconfig/network-scripts/network-functions b/sysconfig/network-scripts/network-functions index ad9e40d3..49d9cca5 100644 --- a/sysconfig/network-scripts/network-functions +++ b/sysconfig/network-scripts/network-functions @@ -131,9 +131,15 @@ check_device_down () check_link_down () { if [ -x /sbin/mii-tool ]; then - LC_ALL=C ip link show $1 2>/dev/null| grep -q UP || ip link set $1 up >/dev/null 2>&1 - # wait for link to come up - sleep 5 + if ! LC_ALL=C ip link show $1 2>/dev/null| grep -q UP ; then + ip link set $1 up >/dev/null 2>&1 + timeout=0 + while [ $timeout -le 10 ]; do + LC_ALL=C ip link show $1 2>/dev/null | grep -q UP && break + usleep 500000 + timeout=$((timeout+1)) + done + fi /sbin/mii-tool $1 >/dev/null 2>&1 || return 1 output=`LC_ALL=C /sbin/mii-tool $1 2>&1` if echo $output | grep -q "Operation not supported"; then -- cgit