$ chkconfig --list yum yum 0:off 1:off 2:off 3:on 4:on 5:on 6:off
I don't think it's a good idea to enable automatic update by default.
On Sat, 2003-08-09 at 03:47, Féliciano Matias wrote:
$ chkconfig --list yum yum 0:off 1:off 2:off 3:on 4:on 5:on 6:off
I don't think it's a good idea to enable automatic update by default.
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.
are you sure you didn't enable it?
-sv
On Sat, Aug 09, 2003 at 09:03:24AM -0400, seth vidal wrote:
On Sat, 2003-08-09 at 03:47, Féliciano Matias wrote:
$ chkconfig --list yum yum 0:off 1:off 2:off 3:on 4:on 5:on 6:off
I don't think it's a good idea to enable automatic update by default.
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.
are you sure you didn't enable it?
This is setup within the init script: # chkconfig: 345 50 01
The postinstall line should not be used at all.
greetings,
Florian La Roche
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".
seth vidal (skvidal@phy.duke.edu) said:
/sbin/chkconfig --add yum
OK, but will set it as enabled if it's enabled by default in the initscripts.
#/sbin/chkconfig yum on
Wrong, but commented out. :)
/sbin/service yum condrestart >> /dev/null
Shouldn't be in %post, should be in %postun:
%postun /sbin/service yum condrestart > /dev/null 2>&1 || :
Bill
On Sun, 2003-08-10 at 16:55, Bill Nottingham wrote:
seth vidal (skvidal@phy.duke.edu) said:
/sbin/chkconfig --add yum
OK, but will set it as enabled if it's enabled by default in the initscripts.
#/sbin/chkconfig yum on
Wrong, but commented out. :)
/sbin/service yum condrestart >> /dev/null
Shouldn't be in %post, should be in %postun:
%postun /sbin/service yum condrestart > /dev/null 2>&1 || :
<sigh>
yes sir, sorry sir. :)
patches to the spec file happily accepted upstream ;)
-sv