RFC: Alternate patch to have true new-style rc.d scripts in
ports (without touching localpkg)
w at expro.pl
Tue Aug 17 01:08:15 PDT 2004
On Tue, Aug 17, 2004 at 01:10:09AM +0200, Oliver Eikemeier wrote:
> Mike Makonnen wrote:
> >I have thought about this considerably, and I think the best solution
> >is to have ports rc.d scripts installed to /etc/rc.d.
> This is what I currently do with slapd, but this approach has multiple
> - it violates the law that packages have to be PREFIX-clean, which has
> some very unfortunate consequences from a packaging point of view.
> - mergemaster barfs ever time (PR 64476)
That's why my suggestion would be: /etc/rc.d/local/ (or
/etc/rc.d/ports/, or whatever you want to call it). In this way you can
easily separate both directories, and as new-style ports rc-scripts have
to be placed in the new location, there is absolutely no confusion about
them. Old scripts in /usr/local/etc/rc.d would be run with localpkg as
they have been before.
> - you can not be sure that the script is not started before the needed
> filesystems are available.
And what if I'd like to make a port that is just a script that makes
something in the base system, before mountcritical stuff or whatever?
If a script requires all mounts to be done, it REQUIREs them. If a port
maintainer breaks his script, that'd be his own fault.
The point is, that rcorder(8) would read and sort both directories in
just one step. It doesn't have to enforce any artificial requirements
for the ports directory, it just goes as it should. And
/etc/rc.d/localpkg works as it doas.
It's all a bit code aesthetics, but I think this one is the cleanest.
The only hack that needs to be done is to specify /etc/rc.d/local/ in
bsd.port.mk, so that noone will complain about the broken PREFIX. This
would probably require some new variable, which would add the thing to
the already generated package-list and include it in the port's data
(so, no changes to the portdir/pkg-plist, just a change in making the
real package's filelist).
I hope that wasn't too much bikeshed. ;)
Jan 'wrzask' Srzednicki
w at expro.pl
More information about the freebsd-current