Description of problem:
When init re-execs itself (from telinit u etc), it doesn't (attempt to) preserve
the WAITING flag, so if this happens while a startup script (say) is being run,
init goes off and runs the next init line in the inittab anyway...
Version-Release number of selected component (if applicable):
I've checked the source of SysVinit-2.85-4.4 (from EL3), but the same code seems
to be present in the version in EL4 and in the upstream 2.86
Steps to Reproduce:
1. (this is a trivial example) add inittab entries like
where each script does some work and sleeps before finishing off.
exec >> /root/abyno 2>&1
echo in test1
echo 'got to end!'
(and similar for the other).
On HUP'ing init they would be run (normally) in order: test1, test2.
2. kill -1 1
3. telinit u
as soon as the telinit u is sent the 2nd script is started (before the fist has
the 2 scripts to run in order as they would without the 'telinit u'
In the default EL3/EL4 /etc/inittab we have entries like:
if one of the init scripts from rc5.d results in 'telinit u' happening then the
getty's and gdm (or whatever) get started *before* the init scripts have
finished. In particular this is likely to be before xfs gets started so gdm
won't work very well (this scares the hell out of my users!)
In my case an init script attempts to apply missed updates (e.g. from when a
machine was off etc), so when (say) glibc (or sysvinit) get upgraded the
postinstall scriptlet ends up doing a telinit u so gdm (and getty's) get
spawned. My users seem to think that the machine is broken and tend to turn it
back off again... The flashing X/gdm failing can eventually get to the 'I can't
start an X server' warning which worries some users...
Of course there might be a good reason why WAITING isn't preserved over a
re-exec, but I don't understand the code well enough to be 100% sure.
Created attachment 132617 [details]
possible patch for EL3 2.85 version, the one for 2.86 differs only by a few lines
This is fixed for RHEL 5, and in the current rawhide Fedora Core development
tree. At this point, it is not planned to be backported to previous Red Hat
Enterprise Linux releases.
Clarify - at least not to RHEL 3.
Note that I did report this issue to the upstream author, but got no reply at all.
From the fc-devel SysVinit-2.86-11.src.rpm it looks like the
sysvinit-2.86-godot.patch is doing what I was suggesting. I don't think I can
look at the EL5 sources to check those (or if I can I don't know where to look!)
If you think that it won't break anything (much), I'm happy to build my own
versions for here on EL3/4 (since who knows when EL5 will be available -- or
However, if a later update of yours reverts this I'd probably be slightly upset.
ie if there arn't going to be fixes for EL3/4 then fine. if any later fixes
include the patch also fine. If a patch (e.g. one still going through qa etc)
undoes this fix then it will cause me more work...
RHEL 5 is going to be using at least what's in FC devel. The reason I say that
it's not planned for RHEL 3 is that I doubt we'll be doing any updates for RHEL
3 for SysVinit at this stage in RHEL 3's lifecycle.