Subject: Re: ipmon does not start as daemon
To: NetBSD-current Discussion List <current-users@netbsd.org>
From: Andrew Brown <atatat@atatdot.net>
List: current-users
Date: 02/27/2002 14:37:19
>> that line of reasoning leads to believing that *all* the settings in
>> /etc/defaults/rc.conf should be set in the binaries, and only be able
>> to be turned *off* through the use of flags.
>
>No, it clearly does not.  You're not _THINKING_ about it!  Stop and
>_THINK_ about all the aspects of this issue and hopefully you'll begin
>to see the true line of reasoning I'm trying to show you.

now then...there you go getting all excited again.  please, let's keep
this civil.  :P

>Here are some more hints:
>
>1. Previously to the addition of '-D', the '&' operator was used
>   explicilty to put "ipmon" into the background and to simulate making
>   it into a daemon.  The '&' did not have to be specified in
>   /etc/rc.conf (or defaulted in /etc/defaults/rc.conf)

okay, but it's better now, with the -D in the defaults.

>2. /etc/rc.d scripts expect to start programs that either complete, or
>   which turn themselves into daemons automatically.  If "ipmon" were
>   written in the true *BSD style it would likely be called "ipmond" and
>   it would require a command-line flag to _prevent_ it from becoming a
>   daemon.  However "ipmon" as it is has been written in the SysV style
>   so that it can be started and monitored and restarted if it fails by
>   /etc/init.  So, as it is, it _MUST_ have the '-D' flag given to it
>   when it's used in a *BSD-way.

actually, i'd have to ask around, but it strikes me that ipmon was
*not* written in the "sysv style" but as a tool that admins were
expected to use from the command line that *later* had the "daemon"
functionality added to it.

>3. requiring the user to copy and maintain the use of a flag from
>   /etc/defaults/rc.conf to /etc/rc.conf, a flag that will always 100%
>   be absolutely required, violates all other expectations set for the
>   ${name}_flags variables used in rc.conf!

the user is expected to be happy with the flags as provided, since we
think we're a smart bunch and know how things are supposed to work.
the user is also, imho, expected to find out what the flags do if they
are considering changing them.  that's what i do.

actually, this all seems to stem from a problem with some old
documentation somewhere...

-- 
|-----< "CODE WARRIOR" >-----|
codewarrior@daemon.org             * "ah!  i see you have the internet
twofsonet@graffiti.com (Andrew Brown)                that goes *ping*!"
andrew@crossbar.com       * "information is power -- share the wealth."