cvs commit: LFS/bootscripts/lfs/init.d functions

nathan at linuxfromscratch.org nathan at linuxfromscratch.org
Fri Mar 19 16:23:37 PST 2004


nathan      04/03/19 17:23:37

  Modified:    bootscripts CHANGELOG
               bootscripts/lfs/init.d functions
  Log:
  Changed killproc, so that it returns [ OK ] if no pids exist, instead of
  if kill succeeded.
  
  Revision  Changes    Path
  1.31      +3 -1      LFS/bootscripts/CHANGELOG
  
  Index: CHANGELOG
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/CHANGELOG,v
  retrieving revision 1.30
  retrieving revision 1.31
  diff -u -r1.30 -r1.31
  --- CHANGELOG	20 Mar 2004 00:10:22 -0000	1.30
  +++ CHANGELOG	20 Mar 2004 00:23:37 -0000	1.31
  @@ -6,6 +6,8 @@
   	* added stop to the setclock script
   	* changed echo > to > in cleanfs, suggested by winkie
   	* Initial additions of some BLFS Scripts
  +	* Edited killproc, so it checks for running pids, rather then
  +	  the completion of the above kill command.  Suggested by Zack
   
   1.99.4 - March 17, 2004
   
  @@ -27,7 +29,7 @@
   
   	* Fixed checkfs script, so it will no longer continue to boot after a
   	  failure in the init.d/checkfs script.  Tested with the help of Andre
  -	  Müller.  Fix suggested by winkie
  +	  Müller.  Fix suggested by Zack
   
   n/a - February 7, 2004
   
  
  
  
  1.3       +10 -3     LFS/bootscripts/lfs/init.d/functions
  
  Index: functions
  ===================================================================
  RCS file: /home/cvsroot/LFS/bootscripts/lfs/init.d/functions,v
  retrieving revision 1.2
  retrieving revision 1.3
  diff -u -r1.2 -r1.3
  --- functions	19 Mar 2004 21:41:26 -0000	1.2
  +++ functions	20 Mar 2004 00:23:37 -0000	1.3
  @@ -187,9 +187,8 @@
           getpids $1
   
           if [ -n "$pidlist" ]; then
  -                failure=0
  -
                   local i=0
  +
                   for pid in $pidlist
                   do
                           kill -$signal $pid 2>/dev/null
  @@ -205,8 +204,16 @@
                           kill -0 $pid 2>/dev/null && failure=1
                   done
   
  +		getpids $1
  +
                   base=${1##*/}
  -                if [ $failure = 0 ]; then rm -f /var/run/$base.pid; fi
  +
  +                if [ -n "$pidlist" ]; then
  +			failure=1
  +		else
  +			failure=0
  +			rm -f /var/run/$base.pid
  +		fi
   
                   (exit $failure)
                   evaluate_retval
  
  
  



More information about the lfs-book mailing list