Author: dnicholson
Date: 2007-10-21 10:33:35 -0600 (Sun, 21 Oct 2007)
New Revision: 7122

Modified:
   trunk/bootscripts/ChangeLog
   trunk/bootscripts/blfs/init.d/gdm
   trunk/bootscripts/blfs/init.d/gpm
   trunk/bootscripts/blfs/init.d/haldaemon
   trunk/bootscripts/blfs/init.d/ntp
Log:
More pid file usage in gdm, gpm, haldaemon and ntp


Modified: trunk/bootscripts/ChangeLog
===================================================================
--- trunk/bootscripts/ChangeLog 2007-10-21 16:33:30 UTC (rev 7121)
+++ trunk/bootscripts/ChangeLog 2007-10-21 16:33:35 UTC (rev 7122)
@@ -1,4 +1,8 @@
 2007-10-21 Dan Nicholson <[EMAIL PROTECTED]>
+       * Changed the gdm, gpm, haldaemon and ntp scripts to reference
+         their pid files in /var/run for all operations.
+
+2007-10-21 Dan Nicholson <[EMAIL PROTECTED]>
        * Fixed the samba and sshd scripts to reference the pid files in
          /var/run. This ensures that the correct processes are killed and
          queried. Also changed the dbus script to use the pid file in the

Modified: trunk/bootscripts/blfs/init.d/gdm
===================================================================
--- trunk/bootscripts/blfs/init.d/gdm   2007-10-21 16:33:30 UTC (rev 7121)
+++ trunk/bootscripts/blfs/init.d/gdm   2007-10-21 16:33:35 UTC (rev 7122)
@@ -10,17 +10,19 @@
 . /etc/sysconfig/rc
 . $rc_functions
 
+pidfile=/var/run/gdm.pid
+
 export PATH=$PATH:/opt/gnome-2.18.3/bin:/opt/gnome-2.18.3/sbin
 
 case "$1" in
        start)
                boot_mesg "Starting GDM..."
-               loadproc gdm
+               loadproc -p $pidfile gdm
                ;;
 
        stop)
                boot_mesg "Stopping GDM..."
-               if [ -f /var/run/gdm.pid ]; then
+               if [ -f $pidfile ]; then
                        loadproc gdm-stop
                fi
                ;;

Modified: trunk/bootscripts/blfs/init.d/gpm
===================================================================
--- trunk/bootscripts/blfs/init.d/gpm   2007-10-21 16:33:30 UTC (rev 7121)
+++ trunk/bootscripts/blfs/init.d/gpm   2007-10-21 16:33:35 UTC (rev 7122)
@@ -23,15 +23,18 @@
        exit 1;
 fi
 
+pidfile=/var/run/gpm.pid
+
 case "$1" in
        start)
                boot_mesg "Starting gpm..."
-               loadproc /usr/sbin/gpm -m $MDEVICE -t $PROTOCOL $GPMOPTS
+               loadproc -p $pidfile /usr/sbin/gpm \
+                       -m $MDEVICE -t $PROTOCOL $GPMOPTS
                ;;
 
        stop)
                boot_mesg "Stopping gpm..."
-               killproc /usr/sbin/gpm
+               killproc -p $pidfile /usr/sbin/gpm
                ;;
 
        restart)
@@ -41,7 +44,7 @@
                ;;
 
        status)
-               statusproc /usr/sbin/gpm
+               statusproc -p $pidfile /usr/sbin/gpm
                ;;
 
        *)

Modified: trunk/bootscripts/blfs/init.d/haldaemon
===================================================================
--- trunk/bootscripts/blfs/init.d/haldaemon     2007-10-21 16:33:30 UTC (rev 
7121)
+++ trunk/bootscripts/blfs/init.d/haldaemon     2007-10-21 16:33:35 UTC (rev 
7122)
@@ -10,15 +10,17 @@
 . /etc/sysconfig/rc
 . $rc_functions
 
+pidfile=/var/run/hald/pid
+
 case "$1" in
        start)
                boot_mesg "Starting the HAL Daemon..."
-               loadproc /usr/sbin/hald --use-syslog
+               loadproc -p $pidfile /usr/sbin/hald --use-syslog
                ;;
 
        stop)
                boot_mesg "Stopping the HAL Daemon..."
-               killproc /usr/sbin/hald
+               killproc -p $pidfile /usr/sbin/hald
                ;;
 
        restart)
@@ -28,7 +30,7 @@
                ;;
 
        status)
-               statusproc /usr/sbin/hald
+               statusproc -p $pidfile /usr/sbin/hald
                ;;
 
        *)

Modified: trunk/bootscripts/blfs/init.d/ntp
===================================================================
--- trunk/bootscripts/blfs/init.d/ntp   2007-10-21 16:33:30 UTC (rev 7121)
+++ trunk/bootscripts/blfs/init.d/ntp   2007-10-21 16:33:35 UTC (rev 7122)
@@ -7,16 +7,18 @@
 . /etc/sysconfig/rc
 . $rc_functions
 
+pidfile=/var/run/ntpd.pid
+
 case "$1" in
        start)
                boot_mesg "Starting ntpd..."
                ntpd -gqx
-               loadproc /usr/sbin/ntpd
+               loadproc -p $pidfile /usr/sbin/ntpd
                ;;
 
        stop)
                boot_mesg "Stopping ntpd..."
-               killproc /usr/sbin/ntpd
+               killproc -p $pidfile /usr/sbin/ntpd
                ;;
 
        restart)
@@ -26,7 +28,7 @@
                ;;
 
        status)
-               statusproc /usr/sbin/ntpd
+               statusproc -p $pidfile /usr/sbin/ntpd
                ;;
 
        *)

-- 
http://linuxfromscratch.org/mailman/listinfo/blfs-book
FAQ: http://www.linuxfromscratch.org/blfs/faq.html
Unsubscribe: See the above information page

Reply via email to