r8422 - trunk/bootscripts/contrib/lsb-v3/blfs/init.d

dj at linuxfromscratch.org dj at linuxfromscratch.org
Tue Apr 27 20:50:35 PDT 2010


Author: dj
Date: 2010-04-27 21:50:35 -0600 (Tue, 27 Apr 2010)
New Revision: 8422

Modified:
   trunk/bootscripts/contrib/lsb-v3/blfs/init.d/gdm
Log:
fix gdm script

Modified: trunk/bootscripts/contrib/lsb-v3/blfs/init.d/gdm
===================================================================
--- trunk/bootscripts/contrib/lsb-v3/blfs/init.d/gdm	2010-04-28 02:36:30 UTC (rev 8421)
+++ trunk/bootscripts/contrib/lsb-v3/blfs/init.d/gdm	2010-04-28 03:50:35 UTC (rev 8422)
@@ -4,9 +4,9 @@
 ### BEGIN INIT INFO
 # Provides:            gdm
 # Required-Start:      $network
-# Should-Start:        cups haldaemon $remote_fs samba sshd
+# Should-Start:        cups haldaemon random $remote_fs samba sshd
 # Required-Stop:       $network
-# Should-Stop:         alsa cups haldaemon $remote_fs samba sshd
+# Should-Stop:         alsa cups haldaemon random $remote_fs samba sshd
 # Default-Start:       5
 # Default-Stop:        0 1 2 3 4 6
 # Short-Description:   Starts/Stops the Gnome Display Manager (GUI Login). 
@@ -16,32 +16,37 @@
 
 . /lib/lsb/init-functions
 
-BIN_FILE="/opt/gnome-2.18.3/sbin/gdm"
+GNOME_PREFIX="/opt/gnome"
+BIN_FILE="${GNOME_PREFIX}/sbin/gdm"
+PIDFILE="/var/run/gdm.pid"
 
 chk_stat
 
 case "$1" in
     start)
         MESSAGE="Starting GDM..."
-        /opt/gnome-2.20/sbin/gdm
+        ${GNOME_PREFIX}/sbin/gdm
         evaluate_retval generic
         ;;
 
     stop)
-        MESSAGE="Stopping GDM..."
-        /opt/gnome-2.20/sbin/gdm-stop
-        evaluate_retval generic
+        if [ -f "$PIDFILE" ]
+        then
+            MESSAGE="Stopping GDM..."
+            ${GNOME_PREFIX}/sbin/gdm-stop
+            evaluate_retval generic
+        fi
         ;;
 
     reload)
         MESSAGE="Reloding GDM (Safe)..."
-        /opt/gnome-2.20/sbin/gdm-safe-restart
+        ${GNOME_PREFIX}/sbin/gdm-safe-restart
         evaluate_retval generic
         ;;
 
     restart)
         MESSAGE="Restarting GDM..."
-        /opt/gnome-2.20/sbin/gdm-restart
+        ${GNOME_PREFIX}/sbin/gdm-restart
         evaluate_retval generic
         ;;
 




More information about the blfs-book mailing list