Rebooting/Halting system from kernel module
Ian Lepore
freebsd at damnhippie.dyndns.org
Sun Jan 22 17:07:38 UTC 2012
On Sun, 2012-01-22 at 14:19 +0400, geoffrey levand wrote:
> Hi,
>
> how would i reboot/halt the system from a kernel module ?
>
> regards
>
> --
> Почта@Mail.Ru в твоем мобильном!
> Просто зайди с телефона на m.mail.ru
There is an undocumented (at least in terms of a manpage) function named
shutdown_nice() in sys/kern/kern_shutdown.c that will send a signal to
the init process if it's running or call boot(9) if not. Or maybe a
direct call to boot(9) is what you're looking for, if bypassing the
running of rc shutdown scripts and all is your goal. (There is a mapage
for boot(9)).
-- Ian
More information about the freebsd-hackers
mailing list