diff options
-rw-r--r-- | initscripts.spec | 6 | ||||
-rw-r--r-- | inittab | 2 | ||||
-rw-r--r-- | inittab.s390 | 2 | ||||
-rwxr-xr-x | prefdm | 37 | ||||
-rwxr-xr-x | rc.d/rc.sysinit | 4 |
5 files changed, 42 insertions, 9 deletions
diff --git a/initscripts.spec b/initscripts.spec index 93fad911..c0cef131 100644 --- a/initscripts.spec +++ b/initscripts.spec @@ -85,6 +85,12 @@ if [ $1 = 0 ]; then fi fi +# Handle converting prefdm to run-once +if fgrep -q "x:5:respawn:/etc/X11/prefdm -nodaemon" /etc/inittab ; then + sed --in-place=.rpmsave 's|^x:5:respawn:/etc/X11/prefdm -nodaemon|x:5:once:/etc/X11/prefdm -nodaemon|g' /etc/inittab +fi + + %preun if [ $1 = 0 ]; then /sbin/chkconfig --del netfs @@ -50,4 +50,4 @@ pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled" 6:2345:respawn:/sbin/mingetty tty6 # Run xdm in runlevel 5 -x:5:respawn:/etc/X11/prefdm -nodaemon +x:5:once:/etc/X11/prefdm -nodaemon diff --git a/inittab.s390 b/inittab.s390 index 6c0a7ee1..bf94dc68 100644 --- a/inittab.s390 +++ b/inittab.s390 @@ -45,4 +45,4 @@ pr:12345:powerokwait:/sbin/shutdown -c "Power Restored; Shutdown Cancelled" 1:2345:respawn:/sbin/mingetty console --noclear # Run xdm in runlevel 5 -x:5:respawn:/etc/X11/prefdm -nodaemon +x:5:once:/etc/X11/prefdm -nodaemon @@ -2,7 +2,6 @@ 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 @@ -26,12 +25,40 @@ fi shopt -s execfail -[ -n "$preferred" ] && exec $preferred "$@" >/dev/null 2>&1 +# If we're in early-login mode and something is running, bail out +if grep -q early-login /proc/cmdline 2> /dev/null ; then + if [ -n "$preferred" ]; then + pidof $preferred >/dev/null 2>&1 && exit 0 + fi + pidof gdm-binary >/dev/null 2>&1 && exit 0 + pidof kdm >/dev/null 2>&1 && exit 0 + pidof xdm >/dev/null 2>&1 && exit 0 +fi + +if [ -n "$preferred" ]; then + $preferred "$@" >/dev/null 2>&1 + if [ $? -ne 127 ]; then + exec $0 "$@" + exit $? + fi +fi # Fallbacks, in order -exec gdm "$@" >/dev/null 2>&1 -exec kdm "$@" >/dev/null 2>&1 -exec xdm "$@" >/dev/null 2>&1 +gdm "$@" >/dev/null 2>&1 +if [ $? -ne 127 ]; then + exec $0 "$@" + exit $? +fi +kdm "$@" >/dev/null 2>&1 +if [ $? -ne 127 ]; then + exec $0 "$@" + exit $? +fi +xdm "$@" >/dev/null 2>&1 +if [ $? -ne 127 ]; then + exec $0 "$@" + exit $? +fi # catch all exit error exit 1 diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit index 266cac2d..ec78d5a5 100755 --- a/rc.d/rc.sysinit +++ b/rc.d/rc.sysinit @@ -220,7 +220,7 @@ echo RHGB_STARTED=0 mount -n /dev/pts -if strstr "$cmdline" rhgb && [ "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then +if strstr "$cmdline" rhgb && ! strstr "$cmdline" early-login && [ "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then LC_MESSAGES= /usr/bin/rhgb RHGB_STARTED=1 fi @@ -496,7 +496,7 @@ if [ -f /etc/rc.modules ]; then fi # Start the graphical boot, if necessary and not done yet. -if strstr "$cmdline" rhgb && [ "$RHGB_STARTED" -eq 0 -a "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then +if strstr "$cmdline" rhgb && ! strstr "$cmdline" early-login && [ "$RHGB_STARTED" -eq 0 -a "$BOOTUP" = "color" -a "$GRAPHICAL" = "yes" -a -x /usr/bin/rhgb ]; then LC_MESSAGES= /usr/bin/rhgb RHGB_STARTED=1 fi |