Subject: Re: ups-nut rc.d scripts
To: Johnny Lam <>
From: Frederick Bruckman <>
List: tech-pkg
Date: 11/20/2001 14:19:52
On Tue, 20 Nov 2001, Johnny Lam wrote:

> On Tue, Nov 20, 2001 at 12:38:10PM -0600, Frederick Bruckman wrote:

> > [But, shouldn't you set them both to "${name}", for consistency?]
> I'm not sure I understand your point.  The upsd script has one variable
> "upsd" controlling the start of two programs.  The upsmon script is simpler
> as it only needs to control one program, so it just looks like one of the
> other rc.d scripts in /etc/rc.d.

OK. (I don't really see why you can't just have two variables, but

> Well, the warning gets printed, but it's harmless, and I think it's beneficial
> because it reminds the user that he needs to add something to /etc/rc.conf
> in order to get the daemon to start.  Or, we could add something like:
> if [ -n "${rcvar}" ]; then
>         if eval test -z \$${rcvar}; then
> 		eval ${rcvar}=NO
>         fi
> fi
> to each pkgsrc rc.d script so that the default action is to silently disable
> the rc.d script.  As I said, I like the warning.  Can you explain why you
> wouldn't want to have the warning displayed?

There's nothing wrong with the warning as such. I'm not suggesting it be
suppressed, I'm suggesting it be satisfied. There should be defaults for
the package "rc.d" scripts just like there are defaults for the other
"rc.d" scripts.

It would not be difficult to write an "INSTALL" script that appends to
"/etc/rc.conf" only if the variable in question is not already set
there, but that would be wrong. It would also be wrong to modify
"/etc/defaults/rc.conf", since that gets overwritten when NetBSD is
upgraded. My considered opinion, is that we should have "/etc/rc.conf"
source one more file for the package defaults, and I suggest we call it
something like "/etc/defaults/pkg.rc.conf".