aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBill Nottingham <notting@redhat.com>2004-02-19 19:01:40 +0000
committerBill Nottingham <notting@redhat.com>2004-02-19 19:01:40 +0000
commit121aaf6e80e7f3ca6865778a5ea96b8b7b3f077a (patch)
treea344fc837114a8853b3dd512560aa27bc4b8299b
parent8511bee60cf26b222eab16a25dfa586f96aad86b (diff)
downloadinitscripts-121aaf6e80e7f3ca6865778a5ea96b8b7b3f077a.tar
initscripts-121aaf6e80e7f3ca6865778a5ea96b8b7b3f077a.tar.gz
initscripts-121aaf6e80e7f3ca6865778a5ea96b8b7b3f077a.tar.bz2
initscripts-121aaf6e80e7f3ca6865778a5ea96b8b7b3f077a.tar.xz
initscripts-121aaf6e80e7f3ca6865778a5ea96b8b7b3f077a.zip
merge in rhgb changes
-rw-r--r--initscripts.spec2
-rwxr-xr-xrc.d/init.d/functions4
-rwxr-xr-xrc.d/rc1
-rwxr-xr-xrc.d/rc.sysinit36
4 files changed, 36 insertions, 7 deletions
diff --git a/initscripts.spec b/initscripts.spec
index 0a718edb..1f4a2167 100644
--- a/initscripts.spec
+++ b/initscripts.spec
@@ -1,6 +1,6 @@
Summary: The inittab file and the /etc/init.d scripts.
Name: initscripts
-Version: 7.31.9.EL
+Version: 7.31.9.EL.r
License: GPL
Group: System Environment/Base
Release: 1
diff --git a/rc.d/init.d/functions b/rc.d/init.d/functions
index 827a96a9..0d3d755c 100755
--- a/rc.d/init.d/functions
+++ b/rc.d/init.d/functions
@@ -24,6 +24,7 @@ if [ -f /etc/sysconfig/i18n -a -z "${NOLOCALE:-}" ] ; then
case "${LANG:-}" in
ja_JP*|ko_KR*|zh_CN*|zh_TW*)
export LC_MESSAGES=en_US
+ export LANG
;;
*)
export LANG
@@ -387,6 +388,7 @@ failure() {
trap - SIGPIPE
fi
[ "$BOOTUP" != "verbose" -a -z "$LSB" ] && echo_failure
+ [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --details=yes
return $rc
}
@@ -437,6 +439,7 @@ strstr() {
# Confirm whether we really want to run this service
confirm() {
+ [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --details=yes
while : ; do
echo -n $"Start service $1 (Y)es/(N)o/(C)ontinue? [Y] "
read answer
@@ -444,6 +447,7 @@ confirm() {
return 0
elif strstr $"cC" "$answer" ; then
rm -f /var/run/confirm
+ [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --details=no
return 2
elif strstr $"nN" "$answer" ; then
return 1
diff --git a/rc.d/rc b/rc.d/rc
index 3323a464..b85bb408 100755
--- a/rc.d/rc
+++ b/rc.d/rc
@@ -92,3 +92,4 @@ for i in /etc/rc$runlevel.d/S* ; do
fi
done
rm -f /var/run/confirm
+[ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --quit
diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 27f09408..4017ae5a 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -73,20 +73,26 @@ if [ -n "$LOGLEVEL" ]; then
/bin/dmesg -n $LOGLEVEL
fi
-# Start the graphical boot, if necessary
-if ! fgrep -q nogui /proc/cmdline && [ "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then
- /usr/bin/rhgb
-fi
+
+# Start the graphical boot, if necessary; /usr may not be mounted yet, so we
+# may have to do this again after mounting
+RHGB_STARTED=0
+mount -n /dev/pts
# Unmount the initrd, if necessary
-if LC_ALL=C grep -q /initrd /proc/mounts && ! LC_ALL=C grep -q /initrd/loopfs /proc/mounts ; then
+if LC_ALL=C fgrep -q /initrd /proc/mounts && ! LC_ALL=C fgrep -q /initrd/loopfs /proc/mounts ; then
if [ -e /initrd/dev/.devfsd ]; then
umount /initrd/dev
fi
- action $"Unmounting initrd: " umount /initrd
+ umount /initrd
/sbin/blockdev --flushbufs /dev/ram0 >/dev/null 2>&1
fi
+if fgrep rhgb /proc/cmdline > /dev/null 2>&1 && [ "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then
+ /usr/bin/rhgb
+ RHGB_STARTED=1
+fi
+
# Configure kernel parameters
update_boot_stage RCkernelparam
action $"Configuring kernel parameters: " sysctl -e -p /etc/sysctl.conf
@@ -206,6 +212,9 @@ fi
if [ -f /forcefsck ] || strstr "$cmdline" forcefsck ; then
fsckoptions="-f $fsckoptions"
elif [ -f /.autofsck ]; then
+ if [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --ping ; then
+ chvt 1
+ fi
echo $"Your system appears to have shut down uncleanly"
AUTOFSCK_TIMEOUT=5
[ -f /etc/sysconfig/autofsck ] && . /etc/sysconfig/autofsck
@@ -346,6 +355,7 @@ rm -f /etc/mtab~ /etc/mtab~~
# Enter root, /proc and (potentially) /proc/bus/usb and devfs into mtab.
mount -f /
mount -f /proc
+mount -f /dev/pts
[ -f /proc/bus/usb/devices ] && mount -f -t usbdevfs usbdevfs /proc/bus/usb
[ -e /dev/.devfsd ] && mount -f -t devfs devfs /dev
@@ -475,6 +485,9 @@ if [ -f /etc/raidtab ]; then
# A non-zero return means there were problems.
if [ $rc -gt 0 ]; then
+ if [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --ping ; then
+ chvt 1
+ fi
echo
echo
echo $"*** An error occurred during the RAID startup"
@@ -549,6 +562,12 @@ fi
# filesystems are NOT unmounted in single user mode.
action $"Mounting local filesystems: " mount -a -t nonfs,smbfs,ncpfs -O no_netdev
+# Start the graphical boot, if necessary and not done yet.
+if fgrep rhgb /proc/cmdline > /dev/null 2>&1 && [ "$RHGB_STARTED" -eq 0 -a "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then
+ /usr/bin/rhgb
+ RHGB_STARTED=1
+fi
+
# check remaining quotas other than root
if [ X"$_RUN_QUOTACHECK" = X1 -a -x /sbin/quotacheck ]; then
if [ -x /sbin/convertquota ]; then
@@ -824,3 +843,8 @@ if [ -x /sbin/redhat-support-check -a -f /var/lib/supportinfo ]; then
sleep 10
}
fi
+# Let rhgb know that we're leaving rc.sysinit
+if [ -x /usr/bin/rhgb-client ] && /usr/bin/rhgb-client --ping ; then
+ /usr/bin/rhgb-client --sysinit
+fi
+