]> git.pld-linux.org Git - packages/gdm2.20.git/blobdiff - gdm.init
- leading zeroes to chkconfig for better comparision with rc-scripts.db.txt
[packages/gdm2.20.git] / gdm.init
index e4acc868f1fd4af61717a71dcaf2945b27028dd5..9eacee3b8ba54a624de7d7eaa4efb137339516f6 100644 (file)
--- a/gdm.init
+++ b/gdm.init
@@ -2,10 +2,10 @@
 #
 # gdm:         Starts the Gnome Display Manager
 #
-# Version:      @(#) /etc/rc.d/init.d/gdm 0.1
+# Version:     @(#) /etc/rc.d/init.d/gdm 0.1
 #
-# chkconfig:   5 95 5
-# description: Starts and stops the Gnome Display Manager at startup and
+# chkconfig:   5 95 05
+# description: Starts and stops the Gnome Display Manager at startup and \
 #              shutdown..
 #
 # config:      /etc/X11/gdm/gdm-config
 . /etc/rc.d/init.d/functions
 
 # Get service config
-if [ -f /etc/sysconfig/gdm ] ; then
-        . /etc/sysconfig/gdm
+if [ -f /etc/sysconfig/gdm ]; then
+       . /etc/sysconfig/gdm
 fi
 
+RETVAL=0
 # See how we were called.
 case "$1" in
   start)
        # Check if the service is already running?
        if [ ! -f /var/lock/subsys/gdm ]; then
                msg_starting "Gnome Display Manager"
-               daemon /usr/X11R6/bin/gdm
-               touch /var/lock/subsys/gdm
+               daemon open /usr/sbin/gdm
+               RETVAL=$?
+               [ $RETVAL -eq 0 ] && touch /var/lock/subsys/gdm
        else
-               msg_Already_Running "Gnome Display Manager"
+               msg_already_running "Gnome Display Manager"
        fi
        ;;
   stop)
-       msg_stopping "Gnome Display Manager"
-       killproc gdm
-       rm -f /var/lock/subsys/gdm
+       if [ -f /var/lock/subsys/gdm ]; then
+               msg_stopping "Gnome Display Manager"
+               killproc gdm
+               rm -f /var/lock/subsys/gdm
+       else
+               msg_not_running "Gnome Display Manager"
+       fi
        ;;
   status)
        status gdm
+       exit $?
        ;;
-  restart|reload)
+  restart|force-reload)
        $0 stop
        $0 start
+       exit $?
        ;;
   *)
-       echo "Usage: $0 {start|stop|status|restart|reload}"
-       exit 1
+       msg_usage "$0 {start|stop|restart|force-reload|status}"
+       exit 3
 esac
 
-exit 0
+exit $RETVAL
This page took 0.052702 seconds and 4 git commands to generate.