Default configuration of yum

Jos Vos jos at xos.nl
Sat Aug 9 13:24:36 UTC 2003


On Sat, Aug 09, 2003 at 09:03:24AM -0400, seth vidal wrote:

> The scripts in the rpm show:
> postinstall scriptlet (using /bin/sh):
> /sbin/chkconfig --add yum
> #/sbin/chkconfig yum on
> /sbin/service yum condrestart >> /dev/null
> exit 0
> 
> note the # sign.
> 
> So it's not being enabled by default.

This is incorrect.  The yum.init script includes the line

   chkconfig:    345 50 01

The "345" means that it is enabled by chkconfig --add.  Otherwise
you should have put a "-" here, which is the right way, in this
case.

Furthermore, starting (or "condrestart") a service (although in the
case of Yum this is jout touching a file) should not be done in a
postinstall script, as this script may run at unforeseeable moment
(like during an install) where it may have undefined effects (again,
in the case of Yum this danger is not very high, but still).

So, I would suggest changing the init script to "chkconfig: - 50 01"
(I also doubt if 50 is a good choice, I would recommend a much higher
number, like 90 or 95) and making the postinstall script only contain
"/sbin/chkconfig --add yum".

-- 
--    Jos Vos <jos at xos.nl>
--    X/OS Experts in Open Systems BV   |   Phone: +31 20 6938364
--    Amsterdam, The Netherlands        |     Fax: +31 20 6948204





More information about the test mailing list