How to disable Ctrl-C during init (initial ramdisk / normal init)

Michael S. Zick mszick at morethan.org
Tue May 23 13:09:15 UTC 2006


On Tue May 23 2006 07:58, Yoann Allain wrote:
> 
> Michael S. Zick a ?crit :
> 
> >On Tue May 23 2006 03:08, Yoann Allain wrote:
> >  
> >
> >>But if you put these lines in /linuxrc, you can still avoid them to be 
> >>executed by permanently pressing ctrl-c when the system starts. And this 
> >>is my problem.
> >>Do you have any idea?
> >>
> >>TIA,     Yoann
> >>
> >>    
> >>
> >
> >Do not permanently press ctrl-c while your system starts.
> >
> >This behavior of BB init is the same as its big brother(s).
> >They respond to terminal controls until they drop the terminal,
> >some continue to do so after they drop the terminal.
> >
> >You can also ctrl-s/ctrl-q the standard init.
> >(In case you run out of paper in your tty while the system
> >is booting.)
> >
> >Mike
> 
> Ok thanks,
> 
> So the only way to avoid a customer to stop the box while launching, is 
> to modify the code in order to ignore these signals...

Correct.  You need a customized init for that, and a lot of testing to
be sure you don't break your boot process.

> Or perhaps there is a way to disable stdin on console during critical 
> phase of init?
> 

Keep the customer away from console.  Like don't wire it out of the box.

Depending on your keyboard - just send a ctrl-s to the keyboard - turn it
off - many keyboards respond to flow control.

Mike



More information about the busybox mailing list