aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2002-12-17 17:21:49 +0000
committerBill Nottingham <notting@redhat.com>2002-12-17 17:21:49 +0000
commite6a4cb14e744f6f0170d1339974d7d581ee4351f (patch)
tree02ffbeb5f41a975726d73b98abeea6598a7bcc16
parent01460530b3f4d88dcd08938cfa45860597d3ed08 (diff)
downloadinitscripts-e6a4cb14e744f6f0170d1339974d7d581ee4351f.tar
initscripts-e6a4cb14e744f6f0170d1339974d7d581ee4351f.tar.gz
initscripts-e6a4cb14e744f6f0170d1339974d7d581ee4351f.tar.bz2
initscripts-e6a4cb14e744f6f0170d1339974d7d581ee4351f.tar.xz
initscripts-e6a4cb14e744f6f0170d1339974d7d581ee4351f.zip
graphical boot changes
-rwxr-xr-xrc.d/init.d/functions17
-rwxr-xr-xrc.d/rc.sysinit23
2 files changed, 34 insertions, 6 deletions
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 15a7fad1..c762275c 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -3,11 +3,6 @@
# functions This file contains functions to be used by most or all
# shell scripts in the /etc/init.d directory.
#
-# Author: Miquel van Smoorenburg, <miquels@drinkel.nl.mugnet.org>
-# Hacked by: Greg Galloway and Marc Ewing
-#
-# i18n originally by: Arnaldo Carvalho de Melo <acme@conectiva.com.br>,
-# Wanderlei Antonio Cavassin
TEXTDOMAIN=initscripts
TEXTDOMAINDIR=/etc/locale
@@ -319,6 +314,9 @@ echo_success() {
[ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
echo -n " ]"
echo -ne "\r"
+ if [ "$BOOTUP" = "graphical" -a -x /usr/bin/rhgb-client ]; then
+ /usr/bin/rhgb-client -ping
+ fi
return 0
}
@@ -330,6 +328,9 @@ echo_failure() {
[ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
echo -n "]"
echo -ne "\r"
+ if [ "$BOOTUP" = "graphical" -a -x /usr/bin/rhgb-client ]; then
+ /usr/bin/rhgb-client -ping
+ fi
return 1
}
@@ -341,6 +342,9 @@ echo_passed() {
[ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
echo -n "]"
echo -ne "\r"
+ if [ "$BOOTUP" = "graphical" -a -x /usr/bin/rhgb-client ]; then
+ /usr/bin/rhgb-client -ping
+ fi
return 1
}
@@ -352,6 +356,9 @@ echo_warning() {
[ "$BOOTUP" = "color" ] && $SETCOLOR_NORMAL
echo -n "]"
echo -ne "\r"
+ if [ "$BOOTUP" = "graphical" -a -x /usr/bin/rhgb-client ]; then
+ /usr/bin/rhgb-client -ping
+ fi
return 1
}
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index ec102d59..287c57e0 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -25,7 +25,16 @@ fi
. /etc/init.d/functions
-# Print a banner. ;)
+# Start the graphical boot, if necessary
+if [ "$BOOTUP" = "graphical" ]
+ if [ -x /usr/bin/rhgb ]; then
+ /usr/bin/rhgb
+ else
+ export BOOTUP=color
+ fi
+fi
+
+# Print a text banner.
echo -en $"\t\tWelcome to "
if grep -q "Red Hat" /etc/redhat-release ; then
[ "$BOOTUP" = "color" ] && echo -en $"\\033[0;31m"
@@ -248,6 +257,10 @@ if [ -z "$fastboot" -a "X$ROOTFSTYPE" != "Xnfs" ]; then
# A return of 2 or higher means there were serious problems.
if [ $rc -gt 1 ]; then
+ if [ "$BOOTUP" = "graphical" ]; then
+ chvt 1
+ fi
+
failure "$STRING"
echo
echo
@@ -494,6 +507,10 @@ if [ -z "$fastboot" ]; then
# A return of 2 or higher means there were serious problems.
if [ $rc -gt 1 ]; then
+ if [ "$BOOTUP" = "graphical" ]; then
+ chvt 1
+ fi
+
failure "$STRING"
echo
echo
@@ -545,6 +562,10 @@ fi
# Configure machine if necessary.
if [ -f /.unconfigured ]; then
+ if [ "$BOOTUP" = "graphical" ]; then
+ chvt 1
+ fi
+
if [ -x /usr/bin/passwd ]; then
/usr/bin/passwd root
fi