Re: ctrl-alt-del poweroff statt reboot

From: Oliver Fromme <olli(at)secnetix.de>
Date: Sat, 2 Jun 2001 09:40:22 +0200 (CEST)

Oliver Schneider <oliver(at)freeware.de> wrote:
> # Site-specific closing actions for daemons run by init on shutdown,
> # or before going single-user from multi-user.
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^
> # Output and errors are directed to console by init, and the
> # console is the controlling terminal.
>
> Könnte in kritischen Situationen für Betroffenheit sorgen.
> shutdown now und plop... wenn das jemand anders sieht :)

Ja stimmt, man sollte natürlich vorher $1 abfragen.
($1 ist "single", wenn es in den Single-user-mode gehen
soll, und "reboot" sonstigenfalls.)

Als Ad-hoc-Lösung (euphemistisch für "übler Quick-Hack")
kannst Du in /sys/kern/kern_shutdown.c in der Funktion
shutdown_nice() das SIGINT durch SIGUSR2 ersetzen.
Kernel neubauen, fertig.

Alternativ kannst Du auch gleich eine saubere Lösung
programmieren, indem Du eine Kernel-Option draus machst
("options SHUTDOWN_POWEROFF" o.ä.) und das dann per
send-pr einreichst.

Gruß
   Olli

-- 
Oliver Fromme, secnetix GmbH & Co KG, Oettingenstr. 2, 80538 München
Any opinions expressed in this message may be personal to the author
and may not necessarily reflect the opinions of secnetix in any way.
"All that we see or seem is just a dream within a dream" (E. A. Poe)
To Unsubscribe: send mail to majordomo(at)de.FreeBSD.org
with "unsubscribe de-bsd-questions" in the body of the message
Received on Sat 02 Jun 2001 - 09:40:29 CEST

search this site