Hi, I'm noticing some strangeness with chkconfig on CentOS 6.0 and was looking for a bit of advice. It appears that chkconfig is re sequencing or re ordering the start priority of various services when turning on a service using chkconfig. Example is the network service. Under normal circumstances network is set to start at S10. However when I add something like snmpd and invoke chkconfig snmpd on it will change network to S81. Which fouls up some of my other services that look for config files on NFS shares. Testing this issue with the snmpd service I removed $network from Required-Start which did nothing. The only solution I've found is to remove the entire BEGIN INIT INFO to END INIT INFO section. Once that is removed it no longer changes the network startup priority when enabling the snmpd service. Seems to me that you'd want network started before snmpd. So why chkconfig wants to re arrange it to start after snmpd which defaults to S50 is beyond me. So why would it do that? Did I miss some documentation or something? :-) Thanks in advance for any assistance! --Jerry
--On Friday, July 22, 2011 11:10:29 AM -0700 Jerry Moore <tech10 at mcn.org> wrote:> It appears that chkconfig is re sequencing or re ordering the start > priority of various services when turning on a service using chkconfig.[...]> The only solution I've found is to remove the entire BEGIN INIT INFO to > END INIT INFO section. Once that is removed it no longer changes the > network startup priority when enabling the snmpd service.SuSE (and perhaps some other distributions) have for a few years been using that BEGIN/END INIT INFO block instead of the 'chkconfig' line to determine ordering, and will do exactly as you described. Without having looked into the CentOS 6 case, I would guess that the mechanism used in RHEL has changed to match. This could very well be related to the LSB project, although that's just a guess, too. Devin
--On Friday, July 22, 2011 11:10:29 AM -0700 Jerry Moore <tech10 at mcn.org> wrote:> It appears that chkconfig is re sequencing or re ordering the start > priority of various services when turning on a service using chkconfig. > Example is the network service. Under normal circumstances network is set > to start at S10. However when I add something like snmpd and invoke > chkconfig snmpd on it will change network to S81. Which fouls up some of > my other services that look for config files on NFS shares. > > Testing this issue with the snmpd service I removed $network from > Required-Start which did nothing.Again just guessing (my one test CentOS 6 system doesn't currently have snmpd installed) have a look at not only the snmpd script but also the ones that should have been started between network and snmpd. It sounds like some dependencies are missing. In particular, do your "other services" depend on $network, either directly or transitively? You might also want to experiment with 'chkconfig XXXXXX reset'. Devin