Re: [master] Improve reboot modes in init.c and shutdown.c.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

Sure, if you want the second DELAYED_REBOOT to actually trigger the
reboot independent of "nokill", then you need to remember that it has
been called earlier already (I think that may be what the old code did,
which had a sigint handler in init to catch CAD during install and a
sigint handler in shutdown which would catch CAD from inside delayed
reboot on loader/anaconda fail out).
I don't know the originally intended nokill semantics well enough.

Nobody knows it seems. This is how it's defined in the Fedora wiki:
nokill
A debugging option that prevents anaconda from terminating all running programs when a fatal error occurs.

I think it is for people like us to be able to inspect state of the running software before the reboot starts. With the fix we are discussing this will still be possible.

I had a hard time formally proofing that this is in fact equivalent to
(rebootAction != DELAYED_REBOOT&&  doKill)
plus reversing then and else case, i.e. negating the if clause.

De Morgan's laws:-) I will switch the branches in the final patch to make it more readable.

Maybe I was just too used to (rebootAction != DELAYED_REBOOT&&  doKill)
because it describes the probably most common case and I understood that
better. Also the previous notation with calling performDelayedReboot
unconditionally after the if statement absolutely made sure, we never
exit init, not even if performReboot didn't work. But then again, I'm
not sure if performReboot can ever fail.

If it fails it's a bug. I like to keep it in the else branch so it's obvious we are not expecting both performDelayedReboot() and performReboot() to be called.

Do we also need the fix for rhel6-branch because of bug 533198?

I don't know. Let's wait for the QA to decide about the bug, then we might just merge it in.

Thanks for reviewing and commenting, I will push this to master as soon as David Cantrell gives it an ACK.

Ales

_______________________________________________
Anaconda-devel-list mailing list
Anaconda-devel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/anaconda-devel-list

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux