/[vps]/baselayout-vserver/branches/baselayout-1_12/sbin/rc-daemon.sh
Gentoo

Diff of /baselayout-vserver/branches/baselayout-1_12/sbin/rc-daemon.sh

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

Revision 202 Revision 203
238 local retval="$?" 238 local retval="$?"
239 239
240 [[ ${retval} != "0" ]] && return "${retval}" 240 [[ ${retval} != "0" ]] && return "${retval}"
241 [[ ${RC_WAIT_ON_START} == "0" ]] && return "${retval}" 241 [[ ${RC_WAIT_ON_START} == "0" ]] && return "${retval}"
242 242
243 # Give the daemon upto 1 second to fork after s-s-d returns
244 # Some daemons like acpid and vsftpd need this when system is under load
245 # Seems to be only daemons that do not create pid files though ...
246 local i=0
247 for ((i=0; i<10; i++)); do
248 is_daemon_running ${cmd} "${pidfile}" && break
249 LC_ALL=C /bin/sleep "0.1"
250 done
251
243 # We pause for RC_WAIT_ON_START seconds and then 252 # We pause for RC_WAIT_ON_START seconds and then
244 # check if the daemon is still running - this is mainly 253 # check if the daemon is still running - this is mainly
245 # to handle daemons who launch and then fail due to invalid 254 # to handle daemons who launch and then fail due to invalid
246 # configuration files 255 # configuration files
247 LC_ALL=C /bin/sleep "${RC_WAIT_ON_START}" 256 LC_ALL=C /bin/sleep "${RC_WAIT_ON_START}"

Legend:
Removed from v.202  
changed lines
  Added in v.203

  ViewVC Help
Powered by ViewVC 1.1.20