Date: Thu, 6 Sep 2001 13:09:55 +0300 From: Peter Pentchev <roam@ringlet.net> To: freebsd-ports@FreeBSD.org Subject: Startup scripts configuration [Was: Re: ports/30274: isc-dhcp3 port out of date] Message-ID: <20010906130955.A1477@ringworld.oblivion.bg> In-Reply-To: <200109060700.f8670EW07539@freefall.freebsd.org>; from root@gits.dyndns.org on Thu, Sep 06, 2001 at 12:00:14AM -0700 References: <200109060700.f8670EW07539@freefall.freebsd.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Sep 06, 2001 at 12:00:14AM -0700, Cyrille Lefevre wrote: > The following reply was made to PR ports/30274; it has been noted by GNATS. > > From: Cyrille Lefevre <root@gits.dyndns.org> > To: freebsd-gnats-submit@FreeBSD.org > Cc: "David W. Chapman Jr." <dwcjr@inethouston.net>, > Nick Johnson <freebsd@spatula.net>, > Pete Fritchman <petef@databits.net> > Subject: Re: ports/30274: isc-dhcp3 port out of date > Date: Thu, 6 Sep 2001 08:59:27 +0200 (CEST) > > Sorry for the late answer, I thought I already update this port. > > Description: > [snip] > files/isc-dhcpd.sh.sample > enhanced a lot to read startup options from > etc/rc.isc-dhcpd.conf. > program and config files checking added. > messages logged through syslog. And once again, this makes me wonder: would it not be better to have a common way of having ports' startup scripts - and local startup scripts, in general - read configuration from a single source? I've brought this up in the past, and my proposal was to use the already existing /etc/rc.conf{,.local} files; the only trouble with this is that reading these files is highly rc-system-dependent. For the present, it is kind of enough to do something like: . /etc/defaults/rc.conf if type source_rc_confs | fgrep 'shell function' > /dev/null; then source_rc_confs else rc_conf_files=${rc_conf_files-"/etc/rc.conf /etc/rc.conf.local"} for i in ${rc_conf_files}; do if [ -r "$i" ]; then . $i fi done fi Yes, I know that some aspects of this are quite ugly, but it does achieve its goal - letting the local startup scripts use the same single source configuration mechanism as the rest of the system does, without populating /usr/local/etc with lots of 20-byte files. And yes, I am aware that this will be changing as soon as the NetBSD startup system makes its appearance; however, the NetBSD system is not likely to make it back to 4.x, not to mention 3.x, and in the meantime, the above snippet works fine for my local configurations.. G'luck, Peter -- This inert sentence is my body, but my soul is alive, dancing in the sparks of your brain. To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-ports" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20010906130955.A1477>