Re: graceful restart from a kernel module

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

 



On Thu, Jan 22, 2009 at 10:21 PM,  <frank_02019@xxxxxxxxx> wrote:
> Hi All,
>
> I have a kernel module that needs to restart the system in a way that
> basically does a "shutdown -r now", because I need the shutdown scripts at
> level 6 to perform some necessary tasks.  Right now, this code calls panic()
> which calls emergency_restart() which (at least on my machine) does not
> allow the shutdown scripts to run.  I've tried calling kernel_restart(), and
> also tried
>
>  C_A_D = 1;
>  ctrl_alt_del();
>
> but in both cases, the system restarted directly in the boot loader.  Any
> ideas on how to gracefully restart from within the kernel?

i think you're looking for usermode_helper()...and use it to call telinit 6.

regards,

Mulyadi.

--
To unsubscribe from this list: send an email with
"unsubscribe kernelnewbies" to ecartis@xxxxxxxxxxxx
Please read the FAQ at http://kernelnewbies.org/FAQ


[Index of Archives]     [Newbies FAQ]     [Linux Kernel Mentors]     [Linux Kernel Development]     [IETF Annouce]     [Git]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux RAID]     [Linux SCSI]     [Linux ACPI]
  Powered by Linux