tech-userlevel archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: pkgsrc RC scripts

At Tue, 06 Oct 2009 22:09:30 +0400, Aleksej Saushev <> 
Subject: Re: pkgsrc RC scripts
> Ignatios Souvatzis <> writes:
> > On Mon, Oct 05, 2009 at 06:36:25PM +0200, Joerg Sonnenberger wrote:
> >> On Mon, Oct 05, 2009 at 06:26:13PM +0200, Ignatios Souvatzis wrote:
> >> > On Sat, Oct 03, 2009 at 11:48:11PM +0200, Joerg Sonnenberger wrote:
> >> > > Hi all,
> >> > > I am consider to make the RC script support in pkgsrc a bit more useful
> >> > > out of the box with the following changes:
> >> > >
> >> > > (1) Install pkgsrc RC scripts by default into /etc/rc.pkg.d, not
> >> > > /etc/rc.d and adjust the default value for rc_directories accordingly.
> >> > > This keeps the logical separation between base and pkgsrc RC scripts
> >> > > and still allows /usr (or /usr/pkg) to be on a separate filesystem.
> >> >
> >> > I don't like that - this messes up installing on shared /usr/pkg systems.
> >>
> >> It isn't any worse than the current status.
> >
> > It is, from my POV. (I use shared /, with the exception of parts of /var
> > and /etc)
> >
> > I prefer that packages do not touch /etc when being installed or
> > deinstalled, and let me do that work when I activate/configure
> > them.

I think I'm jumping into this discussion a little bit late, so perhaps
what I'll say has already been suggested....

I too have diskless systems with shared /, but not /etc or /var, but
including /usr (of course) and thus also /usr/pkg, and the packages
installed on the file server have been built with PKG_SYSCONFDIR set to
/etc too.  (the /etc and /var filesystems are the only ones these
diskless clients have write access to, and further I've successfully
experimented with read-only /etc as well, doing all admin on file

BTW, I _REALLY_ do not like the idea of /etc/rc.pkg.d/  It solves
nothing, it's really not necessary, and is just likely to prolong the
confusion people generally seem to have about how to handle separation
of add-on files from system files.

I _thought_ this issue had been hammered out to death long ago by
defining package rc.d scripts as config files and installing them from
template example files!

I.e. for those (misguided, in my very experienced and humble opinion)
folks who still think they need to keep all add-on files, including
config files, separate from base system files, then the _only_ valid
solution is to set PKG_SYSCONFDIR to some unique location, probably
/usr/pkg/etc, and then do whatever is necessary to ensure they have the
filesystem it is in mounted before rcorder runs.  I'd also say anyone
changing PKG_SYSCONFDIR should be responsible for their own
rc_directories setting changes too.

> You still have to configure such system, the overhead is minimal,
> if exists at all.

Exactly.  Except for now the overhead is "unknown".

Packages often contain template/example files which need to be installed
on the target system, and possibly customised for the target system.
These files are typically installed in /usr/pkg/share/examples and the
package INSTALL script will copy them into place, taking care not to
overwrite any existing copy.  rc.d scripts are just one common class of
files which are examples of this requirement.

I.e. all INSTALL scripts should probably be run on each target system.
Perhaps there should be some option in pkg_add to do this, and perhaps
the scripts need to be supplied an option that will tell them

I haven't tried to do anything like this, even experimentally.  I've
just manually copied the necessary example files into each target
system's /etc directory as necessary.  That is definitely not "minimal"
overhead, but that's to be expected for now.

                                                Greg A. Woods
                                                Planix, Inc.

<>       +1 416 218 0099

Attachment: pgpVR4Fe5pEKz.pgp
Description: PGP signature

Home | Main Index | Thread Index | Old Index