Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 24 Sep 1995 11:19:40 -0400 (EDT)
From:      "Jonathan M. Bresler" <jmb@kryten.Atinc.COM>
To:        Peter da Silva <peter@taronga.com>
Cc:        hackers@freebsd.org
Subject:   Re: ports startup scripts
Message-ID:  <Pine.3.89.9509241051.H27857-0100000@kryten.atinc.com>
In-Reply-To: <199509241434.JAA09429@bonkers.taronga.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 24 Sep 1995, Peter da Silva wrote:

> > 	solves the rename problem.  not the 'is it the same of is it not, 
> > i have to did deeper' problem.
> 
> Sure. If you do it right you just need to make sure it's a symlink.

	urg....symlink.  two files.  requires diff or ls -F to determine 
if same or not.   why require this?  what is the benefit?  to use the 
same to do the same task but in different order a new name is required, 
due to the sort order mechanism.   this is an artifact of the ascii sort 
order being used to determine the order of invokation.   it provides no 
information to the user, only obscures the identity relation between the 
two files.  not good.

> > 	startup and shutdown are inherently complicated with strict order 
> > dependencies (eg mount, nfs, ifconfig, routing, ......)
> 
> That's why the file names start with a number.
> 
> > 	a single file (that may well invoke others to do the work) serves 
> > as a clear outline of the startup/shutdown process.
>   
> So does a directory.

	one directory for all run-states??  or one directory for each.  i 
am advocating one directory for all start, kill and restart scripts.

> > 	should,  but you question consistency and ability of those 
> > writing install scripts.  same question applies to files, contents, and 
> > filenames.
> 
> But those are easy:
> 
> In /etc/daily:
> 	find /etc/rc*.d -type f -print > /tmp/$$
> 	if [ ! -s /tmp/$$ ]
> 	then
> 		echo "Warning... files in /etc/rc.d"
> 		cat /tmp/$$
> 	fi
> 	rm /tmp/$$

	yes.  but when i want to understand the startup/shutdown process 
running a piece of /etc/daily is...not the obvious step.

> > 	i expect the ports-meister and packages-master to enforce that 
> > level of consistency.
> 
> You're assuming that only official ports are going to use this. Bad assumption.

	if you are using a non-offical port, you are NOT a newbie.  if 
yoy really are a newbie, well, either you overestimated your capabilities 
or your gaining experience ;)

> > > (If I had my druthers I'd have an /etc/inetd.d as well)
> 
> > 	no master file??   what executes the individual files and 
> > determines the order of execution....ascii sort order in a shell script?  
> 
> Yes.
> 
> > thats a master file which is generated on the fly.
> 
> Yes. Your point being?

	that both use a master file.  one exists as a file, the other 
exists as an artifact of ascii sort order (not obvious to our poor 
newbie, especially when we have to explain that 10 comes before 2). a 
list of tasks/scripts is clearer to our newbie and easier for everyone else.

for instance: (concept, not correct implementation)

multi_user = "syslog cron"
network    = "syslog cron_net ifconfig named"

now i know that both use the same syslog start script
and that they start cron differently.
the order is explicit, not implicit ascii sort order

> > and must rely on 
> > numerics to determine execution order rather than names.  (eg 67 vs 
> > named, we could use 67named, at least.
> 
> Exactly. That's precisely what System V does. Actually, it has:
> 
> 	S67named
> 	K45named
> 
> So you can have different startup/shutdown orders. I don't know that's
> necessary.

	yeah, i dont know shy either.

> > 	master file could be a shell script, but in place of ascii sort 
> > order, a shell variable and a 'for x in $daemons' loop.
> 
> That's not a master file that has to be edited.
> 
> > 	(are we much closer to agreement than i realize?)
> 
> I suspect so.

	;)))

in summary, my druthers are:
	one directory for all start and stop scripts
	explicit invocation order, a list
	one name per script regardless of run-state/level
		(no links hard or soft)
	explicit names: Snamed (start.named, whatever)

comments:
	dont have to flip directories to see how level 0 differs from 
level 1--just check the list
	no ascii sort order surprises ( 0 1 2 243 43)
	no having to chase links
	increased clarity (i hope)

jmb

Jonathan M. Bresler  jmb@kryten.atinc.com       | Analysis & Technology, Inc.  
FreeBSD Postmaster   jmb@FreeBSD.Org            | 2341 Jeff Davis Hwy
play go.                                        | Arlington, VA 22202
ride bike. hack FreeBSD.--ah the good life      | 703-418-2800 x346




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.3.89.9509241051.H27857-0100000>