[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: init/rc scripts



On Wed, 2002-05-01 at 01:36, Vidiot wrote:
> >Give the man a cigar!
> >
> >That did the trick. I new it there must be something that was
> >stopping the script from running.
> 
> The sshd script is one of the simplist ones there.  Copying that script
> and replacing the appropriate sections with your commands would have
> allowed it to work from time one.  But, neither of us would have learned
> about the process of what is going on.  I still can't find it documented.

use the source Luke.

from rc.d/rc

if [ -d /etc/rc$runlevel.d ]; then
	# First, run the KILL scripts.
	for i in /etc/rc$runlevel.d/K*; do
		# Check if the script is there.
		[ ! -f $i ] && continue

		# Don't run [KS]??foo.{rpmsave,rpmorig} scripts
		[ "${i%.rpmsave}" != "${i}" ] && continue
		[ "${i%.rpmorig}" != "${i}" ] && continue
		[ "${i%.rpmnew}" != "${i}" ] && continue

		# Check if the subsystem is already up.
		subsys=${i#/etc/rc$runlevel.d/K??}
		[ ! -f /var/lock/subsys/$subsys ] && \
		    [ ! -f /var/lock/subsys/${subsys}.init ] && continue

		# Bring the subsystem down.
		if egrep -q "(killproc |action )" $i ; then
			$i stop
		else
			action $"Stopping $subsys: " $i stop
		fi
	done


Looks like it looks in /var/lock/subsys/ for a file named $subsys or
${subsys}.init where $subsys is the name of the Kill script minus the
path to the script and the K?? 

Bret

I ad not noticed the confirm mode either that is also in the script.  I
have wondered where the "Entering non-interactive startup" messages came
from and how to affect the behavior.

Good catch brian.






> 
> MB
> -- 
> e-mail: vidiot vidiot com       It is God's job to forgive bin Laden.
>                                 It is our job to set up the meeting.
> 	                            U.S. Marine Corp.
> Visit - URL: http://www.vidiot.com/  (Your link to Star Trek and UPN)
> 
> 
> 
> _______________________________________________
> Redhat-list mailing list
> Redhat-list redhat com
> https://listman.redhat.com/mailman/listinfo/redhat-list






[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]