Subject: Re: rc.d, etcupdate and etc...
To: Martti Kuparinen <firstname.lastname@example.org>
From: mouss <email@example.com>
Date: 12/25/2004 22:02:37
Martti Kuparinen wrote:
> What's wrong with this setup:
> - set postfix=YES in /etc/rc.conf
> - keep the original /etc/rc.d/postfix
> - modify /etc/mailer.conf to use the /usr/pkg/sbin/sendmail
> - use this /etc/rc.conf.d/postfix
> start_cmd='/usr/pkg/sbin/postfix start'
> stop_cmd='/usr/pkg/sbin/postfix stop'
> reload_cmd='/usr/pkg/sbin/postfix reload'
> Works perfectly for me...
That's ok except if you run the /usr/pkg/etc/rc.d/ scripts, where the
postfix package would install an rc script. Both scripts use the same
variable in rc.conf (postfix), so you can't disable one by editing
rc.conf. The following methods seem unsatisfactory in my opinion:
- one can use a different rc.conf for packages, so that you can put
postfix=no in /etc/rc.conf, but postfix=yes in /usr/pkg/etc/rc.conf.
This may be the simplest way, no?
- one can remove the postfix files that come with the system and only
keep those that come with the package. This is what I did, because this
makes it easy to "postfix reload" (and other commands) without caring of
the path and of version diffs.
I'd however prefer a cleaner way to remove say postfix and sendmail from
the base system. for instance, if they are not built, one should be able
to remove them (otherwise, you keep an old version of sendmail and new
config files!!). Would an option to etcupdate be the right way?