Magellan Linux

Diff of /trunk/initscripts/sysvinit/rc/functions

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

trunk/magellan-initscripts/rc/functions revision 1263 by niro, Fri Mar 11 17:44:48 2011 UTC trunk/initscripts/sysvinit/rc/functions revision 1665 by niro, Fri Jan 20 23:01:04 2012 UTC
# Line 203  print_status() Line 203  print_status()
203    
204  getpids()  getpids()
205  {  {
206   base=${1##*/}   local base=${1##*/}
207   pidlist=$(pidof -o $$ -o $PPID -x $base)   local opts
208     if [[ $(readlink /bin/pidof) = *busybox ]]
209     then
210     opts=""
211     else
212     opts="-x"
213     fi
214     pidlist=$(pidof -o $$ -o $PPID ${opts} $base)
215  }  }
216    
217  loadproc()  loadproc()
# Line 266  killproc() Line 273  killproc()
273   done   done
274    
275   base=${1##*/}   base=${1##*/}
276   if [ $failure = 0 ]; then rm -f /var/run/$base.pid; fi   if [ $failure = 0 ]; then rm -f /run/$base.pid; fi
277    
278   (exit $failure)   (exit $failure)
279   evaluate_retval   evaluate_retval
# Line 325  statusproc() Line 332  statusproc()
332   then   then
333   echo "$base is running with Process ID(s) $pidlist"   echo "$base is running with Process ID(s) $pidlist"
334   else   else
335   if [ -s /var/run/$base.pid ]   if [ -s /run/$base.pid ]
336   then   then
337   echo "$1 is not running but /var/run/$base.pid exists"   echo "$1 is not running but /run/$base.pid exists"
338   return 1   return 1
339   else   else
340   echo "$1 is not running"   echo "$1 is not running"

Legend:
Removed from v.1263  
changed lines
  Added in v.1665