Subject: Re: Keeping /etc/defaults and /etc/rc.d in-sync
To: Greywolf <greywolf@starwolf.com>
From: Frederick Bruckman <fredb@immanent.net>
List: tech-userlevel
Date: 12/26/2001 23:18:42
On Wed, 26 Dec 2001, Greywolf wrote:
> On Wed, 26 Dec 2001, Frederick Bruckman wrote:
>
> # On Wed, 26 Dec 2001, Greywolf wrote:
> #
> # In that case, I would like it if "/etc/rc.conf" let you set the path
> # to the executable, like so
> #
> # ntpd=YES ntpd_path="/usr/local/bin/ntpd" ntpd_flags=""
> #
> # That would actually go a long way toward solving the question of what
> # to do with pkgsrc rc.d scripts. (They shouldn't be any different than
> # the current base scripts. If pkgsrc does need to add a shell function,
> # you make it conditional on the version as reported by the utility.)
>
> Actually, what would go a long way toward solving that would also be
> /etc/mk.conf, in which LOCALBASE and X11BASE are defined.
>
> i.e.
>
> ntpd=YES ntpd_path="$LOCALBASE/bin/ntpd"
>
> This in case LOCALBASE ever gets redefined and migrated. Not likely,
> but possible.
You could just set those in "/etc/rc.conf", like near the bottom,
perhaps, and they'd be expanded when the file is sourced. Like so:
# Put your overrides for installed packages here:
#
LOCALBASE=/usr/pkg
X11PREFIX=/usr/X11R6
#named=YES named_path="${LOCALBASE}/bin/named" named_flags=""
#xdm=YES xdm_path="${X11PREFIX}/bin/kdm" xdm_flags=""
[X11PREFIX is the user configurable setting for where X packages get
installed. X11BASE always points to /usr/X11R6, where X is installed.]
Frederick