Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#4391 - fix: GDM delay and errors on shutdown

Attached to Project: Arch Linux
Opened by fluxt (fluxt) - Thursday, 06 April 2006, 23:19 GMT
Last edited by arjan timmerman (blaasvis) - Friday, 07 April 2006, 06:54 GMT
Task Type Bug Report
Category Packages: Extra
Status Closed
Assigned To Jan de Groot (JGC)
Architecture not specified
Severity Low
Priority Normal
Reported Version 0.7.1 Noodle
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

GDM reports errors when shuting down or rebooting, it also displays [FAIL] when the service is not running at shutdown which is usually the case. Failure for gdmflexiserver to connect to X which is not usually running at shutdown results in a seconds of delay. Also because the stop fails, this script gets executed twice at shutdown.

I've create a diff for /opt/gnome/sbin/gdm-stop with fixes:
* Stops the call to gdmflexiserver if X is not running, removing seconds delay and error messages.
* No irrelevant errors reported in runlevel 0 or 6 such as "perhaps GDM isn't running".
* Success reported in runlevel 0 and 6 if the PID file is not found.

The fix tested fine on my system but feel free to modify it as you see fit

--- old/opt/gnome/sbin/gdm-stop 2006-04-08 05:48:44.000000000 +1000
+++ new/opt/gnome/sbin/gdm-stop 2006-04-08 07:34:49.000000000 +1000
@@ -1,7 +1,12 @@
#!/bin/sh

-PIDFILE=`gdmflexiserver --command="GET_CONFIG daemon/PidFile"`
-CHECKPIDFILE=`echo $PIDFILE | sed 's/^\([^ ]*\) .*$/\1/'`
+if [ "x$(pidof X)" != "x" ]; then
+ PIDFILE=`gdmflexiserver --command="GET_CONFIG daemon/PidFile"`
+ CHECKPIDFILE=`echo $PIDFILE | sed 's/^\([^ ]*\) .*$/\1/'`
+fi
+
+RUNLEVEL=`runlevel | awk '{ print $2 }'`
+
if [ "x$CHECKPIDFILE" = "xOK" ]; then
PIDFILE=`echo $PIDFILE | sed 's/^.* \(.*\)$/\1/'`
else
@@ -9,13 +14,18 @@
fi

if test x$PIDFILE = x ; then
- echo "Can't find the PID file in the configuration file, going to try:"
- echo "/var/run/gdm.pid"
+ if [ $RUNLEVEL -gt 0 ] && [ $RUNLEVEL -lt 6 ]; then
+ echo "Can't find the PID file in the configuration file, going to try:"
+ echo "/var/run/gdm.pid"
+ fi
PIDFILE=/var/run/gdm.pid
fi
if test '!' -f $PIDFILE ; then
- echo "$PIDFILE doesn't exist, perhaps GDM isn't running"
- exit 1
+ if [ $RUNLEVEL -gt 0 ] && [ $RUNLEVEL -lt 6 ]; then
+ echo "$PIDFILE doesn't exist, perhaps GDM isn't running"
+ exit 1
+ fi
+ exit 0
fi
# exec the kill to get the correct return code
exec kill -TERM `cat $PIDFILE`
This task depends upon

Closed by  arjan timmerman (blaasvis)
Wednesday, 17 May 2006, 13:12 GMT
Reason for closing:  Implemented
Additional comments about closing:  thanks for the patch
Comment by fluxt (fluxt) - Thursday, 06 April 2006, 23:21 GMT
The formatting came out bad so I've attached the file.

Loading...