Subject: Re: Allowing ${name}_path to be set in "rc.conf", was Re: Keeping /etc/defaults and /etc/rc.d in-sync
To: Frederick Bruckman <fredb@immanent.net>
From: Andrew Brown <atatat@atatdot.net>
List: tech-userlevel
Date: 01/04/2002 22:39:01
>> >For "pkgsrc" purposes (and possibly for most purposes), permitting
>> >${name}_path to be set in "/etc/rc.conf" would be enough. "sshd", for
>> >example, could be changed to conform to the NetBSD naming scheme, or
>> >else the rc.d script could conditionalize on detecting one version or
>> >another, or else it could conditionalize on a flag, and then we could
>> >leave "/etc/rc.conf.d" to the user.
>>
>> well...almost.  the pkgsrc sshd doesn't use or need the same files in
>> /etc that the openssh stuff needs,
>
>That can be fixed...

via use of more variables, yes, although some parts won't...translate
well.

>> so there's more than just the
>> command you'd need to tweak in order to get them to change places
>> easily.  hence my other settings in /etc/rc.conf.d/sshd.
>
>...or else I'm sure the two can be distinguished in the script. I
>don't have a copy of the other "sshd" handy -- does `sshd -v
>2>/dev/null/' return anything useful? The point is, we have control of
>the binary and the script, so the user shouldn't have to get creative
>just to enable a package.

afaict, neither of them produces anything interesting from that
particular invocation.  the point is that i didn't have to do anything
terribly creative to get the pkgsrc sshd running.  i could have simply
left sshd set to YES, and set command=/usr/pkg/sbin/sshd in my
/etc/rc.conf.d/sshd file to get it to run, but /etc/rc.d/sshd would
have insisted on installing some useless (to me) keys the first time.
generated with the "wrong" keygen program, to boot.  overriding that
"feature" was easy enough.

-- 
|-----< "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."