--- gdm-2.20.1/utils/gdm-stop.in.orig 2007-10-16 00:42:57.000000000 +0300 +++ gdm-2.20.1/utils/gdm-stop.in 2008-05-08 10:19:43.000000000 +0300 @@ -1,9 +1,13 @@ #!/bin/sh PIDFILE=@GDM_PID_FILE@ +RUNLEVEL=`runlevel | awk '{ print $2 }'` 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`