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

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

 



On 01/29/2010 08:22 PM, Steffen Maier wrote:
> On 01/29/2010 11:03 AM, Ales Kozumplik wrote:
>> Stop the kernel correctly on HALT (so that we dont see 'kernel panic, they
>> killed init' on i386 and on s390 one gets easy access to manual IPL).
>>
>> Introduce a new reboot method that does allow us to see the backtrace and
>> doesn't scroll the screen up with useless unmount info.

>> diff --git a/loader/init.c b/loader/init.c

> I suppose there is at least one more call of shutDown that should use
> shutdown_method instead of a hardcoded reboot_action:
> 
> /* reboot handler */
> static void sigintHandler(int signum) {
>     termReset();
>     shutDown(getKillPolicy(), REBOOT);
> }
> 
> REBOOT => shutdown_method
> Which requires shutdown_method to be static and global to the compile
> unit init.c. Otherwise, I fear, pressing CAD will unconditionally REBOOT
> even if shutdown_method was set to VERBOSE_REBOOT above.

Confused I am. CAD causing unconditional REBOOT is probably exactly what
is intended to get out of performVerboseReboot's endless loop. It now
just works a little different than before all the modifications.

>> diff --git a/loader/shutdown.c b/loader/shutdown.c

>> +    while (1) {
>> +        sleep(1);
>> +    }
>> +}

>> +void shutDown(int doKill, reboot_action rebootAction)
>> +{
>> +    if (rebootAction == VERBOSE_REBOOT) {
>> +        performVerboseReboot();
> 
> Does the SIGINT/CAD to reboot still work for non-s390 now that the
> rebootHandler is gone from shutdown.c?
> 
> The other sigint handler in init.c only triggers this code path in
> shutdown, but then shutdown seems to be trapped in
> performVerboseReboot's endless loop.

Disagreeing with myself, init.c potentially calls shutDown with
DELAYED_REBOOT, which is fine.

> Master and rhel6-branch would additionally need the following:
> + a new option -H for the main() of AS_SHUTDOWN to HALT
> + changing linuxrc.s390 to exec "/sbin/shutdown -H" in doshutdown()

Reconsidering this, I think we don't need any of those additions since
AS_SHUTDOWN's default is HALT already and linuxrc.s390 already calls
shutdown without any option so we get HALT as default.

Steffen

Linux on System z Development

IBM Deutschland Research & Development GmbH
Vorsitzender des Aufsichtsrats: Martin Jetter
Geschäftsführung: Dirk Wittkopp
Sitz der Gesellschaft: Böblingen
Registergericht: Amtsgericht Stuttgart, HRB 243294


_______________________________________________
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