[NTLUG:Discuss] strange behavior with chkconfig/ntsysv on RH 6.2
Seth
dev-null at iname.com
Mon Jan 29 18:40:18 CST 2001
Hello:
I have a RedHat 6.2 / i386 / Linux 2.2.14 system, that is exhibiting some
strange
behavior with the chkconfig and ntsysv programs. Currently I have
chkconfig-1.2.16-1,
ntsysv-1.1.3-1, and initscripts-5.49-1 installed.
A couple of months ago both chkconfig and ntsysv would segfault when I tried to
execute them. Considering both programs were behaving similarly and looking
at strace output I determined that the heart of the problem was related to the
initscripts themselves. Furthermore I figured out that by opening an
initscript with
a text editor and then saving the script (without making changes),
chkconfig --list
would be able to read the file and move on.
For example, the first script that chkconfig reads on my system is
apmd. By running
one of these commands, chkconfig IS ABLE to move past the apmd script:
# cd /etc/rc.d/init.d; cp apmd ~/apmd.sav; mv -f ~/apmd.sav apmd
or with vi:
# vim +"wq" /etc/rc.d/init.d/apmd
The commands below, however, DO NOT fix anything, and chkconfig still
segfaults
on the apmd script:
# cd /etc/rc.d/init.d; mv apmd ~/apmd.sav; mv -f ~/apmd.sav apmd
or with touch:
# touch /etc/rc.d/init.d/apmd
So it appears that opening a file for writing fixes chkconfig, but just
touching it or moving it
around does not. As far as I can tell (diff, md5sum) there is not a
noticeable difference
after the file has been resaved, other than the time stamp. What would
cause chkconfig
to pick up a difference between two identical files?
At this point I've "fixed" about 20 of the 45 scripts using one of the
techniques above,
once the other 25 or so scripts are fixed the problem will be gone forever
... 8( So I would
like to get some suggestions on what else I might try to help figure out
what the real problem
is. I have to repair the rest of the files soon, because chkconfig being
broken tends to
cause problems with RPM installations. I am willing to delay ( a little
while ) fixing the
files to allow some other peoples ideas to tested.
Note: ntsysv no longer segfaults, I suppose I fixed enough of the files for
it to execute
okay. chkconfig --list is still segfaulting though.
Also, I've checked lsof and fuser output, and have not found anything open
on the
initscripts.
Any suggestions or comments would be greatly appreciated.
Thanks in advance,
Seth
PS: I can send strace output to anyone who's interested.
More information about the Discuss
mailing list