Re: RCng Awkwardness

2002-10-31 Thread David O'Brien
On Wed, Oct 30, 2002 at 11:50:45AM -0800, Tim Kientzle wrote:
> I find the standard arguments used by RCng quite
> awkward.  In particular, especially for people who
> have worked with SysV-style init scripts, it's

We aren't trying to be compatable with SysV.  We are compatable with
other BSD's with an RCng deployment.

> I would find it vastly more intuitive if the
> current arguments were named differently:
> 
> current 'start'  ->  new 'boot'
> current 'stop'  -> new 'shutdown'
> current 'forcestart' -> new 'start'
> current 'forcestop' -> new 'stop'

No thank you.  This would be a gratitious change from the existing BSD
prior art.

> This better reflects the actual usage:
> the current 'start' and 'stop' are really
> intended to be used by RC at system boot
> and shutdown time.

No, they are also used by sysadmins wanting to cycle a service.

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: RCng Awkwardness

2002-10-30 Thread Gordon Tetlow
On Wed, Oct 30, 2002 at 02:23:48PM -0800, Tim Kientzle wrote:
> Gordon Tetlow wrote:
> 
> >On Wed, Oct 30, 2002 at 11:50:45AM -0800, Tim Kientzle wrote:
> >
> >>I find the standard arguments used by RCng quite
> >>awkward.  In particular, ... "/etc/rc.d/nfsd stop" does
> >>not actually stop the nfsd process. ...
> >
> >... I've found this behavior to be quite annoying. I'll
> >see if I can put something together. If you want to help me out and
> >put together the patches, I'd be more than happy to commit them.
> 
> 
> I have something partly sketched out, but
> it still needs some work.  I can
> send you something in the next
> couple of days to look at.
> 
> I see two awkward issues:
> 
> * Is it necessary to distinguish 'stop'
>   (unconditional stop) from 'shutdown'
>   (stop only if enabled)??
> 
>   Seems that at system shutdown you want
>   everything to be taken down, regardless
>   of whether it was brought up at boot
>   or brought up manually post-boot.
>   The unconditional 'stop' seems to be
>   all that's needed.

I agree, but can you make it use shutdown and just alias it to stop?
This will be just in case we see a new need for a special shutdown case.

> * Local rc scripts (in /usr/local/etc/rc.d)
>   will still get run with a 'start'
>   argument, while system scripts in
>   /etc/rc.d will get a 'boot' argument.
>   That's a bit awkward, but still
>   reasonably consistent:  'start'
>   is still an unconditional operation.

That's fine. No big deal there.

-gordon



msg45718/pgp0.pgp
Description: PGP signature


Re: RCng Awkwardness

2002-10-30 Thread Tim Kientzle
Gordon Tetlow wrote:


On Wed, Oct 30, 2002 at 11:50:45AM -0800, Tim Kientzle wrote:


I find the standard arguments used by RCng quite
awkward.  In particular, ... "/etc/rc.d/nfsd stop" does
not actually stop the nfsd process. ...


... I've found this behavior to be quite annoying. I'll
see if I can put something together. If you want to help me out and
put together the patches, I'd be more than happy to commit them.



I have something partly sketched out, but
it still needs some work.  I can
send you something in the next
couple of days to look at.

I see two awkward issues:

* Is it necessary to distinguish 'stop'
  (unconditional stop) from 'shutdown'
  (stop only if enabled)??

  Seems that at system shutdown you want
  everything to be taken down, regardless
  of whether it was brought up at boot
  or brought up manually post-boot.
  The unconditional 'stop' seems to be
  all that's needed.

* Local rc scripts (in /usr/local/etc/rc.d)
  will still get run with a 'start'
  argument, while system scripts in
  /etc/rc.d will get a 'boot' argument.
  That's a bit awkward, but still
  reasonably consistent:  'start'
  is still an unconditional operation.

  I don't see any way around this without
  breaking existing systems after upgrade.

Tim Kientzle




To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: RCng Awkwardness

2002-10-30 Thread Andrew Gallatin

Gordon Tetlow writes:
 > On Wed, Oct 30, 2002 at 11:50:45AM -0800, Tim Kientzle wrote:
 > > I find the standard arguments used by RCng quite
 > > awkward.  In particular, especially for people who
 > > have worked with SysV-style init scripts, it's
 > > rather surprising that "/etc/rc.d/nfsd stop" does
 > > not actually stop the nfsd process.  Likewise, 'start'
 > > doesn't actually start the specified system.
 > 
 > As one of the people that supposedly worked on this. I'm heartily in
 > favor of this. I've found this behavior to be quite annoying. I'll
 > see if I can put something together. If you want to help me out and
 > put together the patches, I'd be more than happy to commit them.
 > 
 > -gordon

Even more annoyingly, the RCng nfsd script ignores arguments specified
in /etc/rc.conf.  See the example below, where "nfsd" is my patched
script, "nfsd.old" is what is in CVS now.  Patch appended.

% grep nfs /etc/rc.conf
nfs_server_enable="YES"
nfs_server_flags="-u -t -n 8 -h 172.31.193.10 -h 172.31.193.1"
% ./nfsd.old stop
nfsd not running?
% sudo ./nfsd.old start
Starting nfsd.
% ps ax | grep nfsd | wc -l
   5
%sudo ./nfsd.old stop
Stopping nfsd.
kill: 2903: No such process
kill: 2905: No such process
<4:33pm>whisper/gallatin:rc.d>ps ax | grep nfsd | wc -l
   0
% sudo ./nfsd start
Starting nfsd.
% ps ax | grep nfsd | wc -l
   9
%

Note that the default script ignores the arguments -n 8 and starts
only 4 nfsds.

Can this be fixed, please?

Thanks,

Drew

cvs diff nfsd
Index: nfsd
===
RCS file: /home/ncvs/src/etc/rc.d/nfsd,v
retrieving revision 1.8
diff -u -r1.8 nfsd
--- nfsd12 Oct 2002 10:31:31 -  1.8
+++ nfsd24 Oct 2002 23:57:27 -
@@ -13,6 +13,7 @@
 name="nfsd"
 rcvar=`set_rcvar nfs_server`
 command="/usr/sbin/${name}"
+load_rc_config $name

 case ${OSTYPE} in
 FreeBSD)
@@ -51,5 +52,4 @@
return 0
 }

-load_rc_config $name
 run_rc_command "$1"

To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message



Re: RCng Awkwardness

2002-10-30 Thread Gordon Tetlow
On Wed, Oct 30, 2002 at 11:50:45AM -0800, Tim Kientzle wrote:
> I find the standard arguments used by RCng quite
> awkward.  In particular, especially for people who
> have worked with SysV-style init scripts, it's
> rather surprising that "/etc/rc.d/nfsd stop" does
> not actually stop the nfsd process.  Likewise, 'start'
> doesn't actually start the specified system.

As one of the people that supposedly worked on this. I'm heartily in
favor of this. I've found this behavior to be quite annoying. I'll
see if I can put something together. If you want to help me out and
put together the patches, I'd be more than happy to commit them.

-gordon



msg45677/pgp0.pgp
Description: PGP signature


RCng Awkwardness

2002-10-30 Thread Tim Kientzle
I find the standard arguments used by RCng quite
awkward.  In particular, especially for people who
have worked with SysV-style init scripts, it's
rather surprising that "/etc/rc.d/nfsd stop" does
not actually stop the nfsd process.  Likewise, 'start'
doesn't actually start the specified system.

I would find it vastly more intuitive if the
current arguments were named differently:

current 'start'  ->  new 'boot'
current 'stop'  -> new 'shutdown'
current 'forcestart' -> new 'start'
current 'forcestop' -> new 'stop'

This better reflects the actual usage:
the current 'start' and 'stop' are really
intended to be used by RC at system boot
and shutdown time.  'forcestart' and
'forcestop' are really for manually
starting/stopping services.

For that matter, I don't really understand
why 'stop' and 'forcestop' are separate
anyway; if I type 'stop', I want it to
stop, even if rc.conf says it shouldn't
be running.

I could provide diffs to change this, but won't
bother if everyone else thinks the existing
system is perfect and unalterable.  ;-)

Tim Kientzle


To Unsubscribe: send mail to [EMAIL PROTECTED]
with "unsubscribe freebsd-current" in the body of the message