tech-pkg archive

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

Re: pkgsrc RC scripts



matthew sporleder wrote:
I restarted (# /etc/rc.d/xyz restart) daemons way more often than I
reboot.  Having all of that available in one place is the only way to
go.
If multiple (possibly self contained) configuration domaines (e.g. / for the base system, /usr/pkg for pkgsrc packages, /usr/X11R7 for X11 etc) would exist and these would
be supported by the OS (e.g. rcorder knows about them and when they need
to be mounted), then one could also have a "rc" command that knows about the domains
and that could call the right script, e.g.for your example above:

# rc xyz restart

that then would do TRT.

I'm not saying it should be done that way, just that there are other solutions to the problems raised by the people that want the configuration and startup scripts of a domain inside the root filesystem, either mixed into the locations of the base OS in way that they cannot easily be distinguished from the base OS configuration/startup scripts (e.g. all rc scripts inside /etc/rc.d), or separated in a folder structure inside the root filesystem
(e.g. pkg rc scripts inside /etc/rc.pkg.d or similar).

But this scheme has also draw backs:

- the rc.subr must be kept in sync between e.g. /usr/pkg and the base OS whereas they could
 be independent if /usr/pkg and the base OS are completly separated.
- people who want to share /usr/pkg on different hosts have to manually install the rc scripts
 of /usr/pkg packages to the root filesystem on each host
- just blowing away /usr/pkg is not enough to remove all traces of a pkg installation

Of course, a self contained domain (e.g. /usr/pkg) is also difficult to administer if shared on
multiple hosts:

- how to handle VARBASE (when iinside /usr/pkg) which cannot simply be shared, but a directory structure has to exist on each host's VARBASE (this problem also exists for the above scenario) - if /usr/pkg/etc is shared, different configuration settings on different hosts, e.g. port numbers for servers, rc.conf YES/NO settings depending on the host is difficult, but as the startup
 and the configuration files are shell scripts, we all know how to do it.

What I'd like to have is a choice with the advantages and disadvantages of the different options documented and some guidelines for best practices for typical usages. And the
OS should support the different ways and not outrule one or the other.

Joachim











Home | Main Index | Thread Index | Old Index