On Wed, 28 Feb 2001, Andy Worthington wrote:
> I am working on several contrib rpms
Cool!
> and had a few questions. I followed
> the howto on the e-smith.org site and it is working fine but I wanted to
> know the best/suggested way of doing the following in the rpm:
>
> Adding a service to the configuration file and setting it to enabled
You have a number of options, each with pros and cons.
- do it in %post action as you have suggested below
- include an action script which hooks into the console-save event, and
enables the service if there is do existing db entry for it
- include a README which tells the user to enable the service after
installing the RPM.
We have had problems with %pre and %post scripts as they get run when RPMs
are installed, even during the install from CD phase. So we get apache
being restarted as a side effect of installing rpms - and who needs that
during the install from CD phase - it just slows things down and can cause
problems.
> Creating the link of /etc/rc.d/rc7.d/S99servicename ->
> /etc/rc.d/init.d/e-smith-service
Two choices here, and you could do both:
- include the symlink in the RPM, by including the appropriate command in
the %build section of your spec file.
- include a call to esmith::util::serviceControl in a blah-conf-startup
script - you can combine that call with the service database
initialisation.
Don't forget to ask for a contrib directory and post us your RPMs for
hosting once you are done.
Regards
--
Charlie Brady [EMAIL PROTECTED]
http://www.e-smith.org (development) http://www.e-smith.com (corporate)
Phone: +1 (613) 368 4376 or 564 8000 Fax: +1 (613) 564 7739
e-smith, inc. 1500-150 Metcalfe St, Ottawa, ON K2P 1P1 Canada