How to disable Ctrl-C during init (initial ramdisk / normal init )
Rob Landley
rob at landley.net
Sun May 28 04:25:07 UTC 2006
On Tuesday 23 May 2006 11:46 am, Rich Felker wrote:
> While there are some additional semantics, /dev/console is the same as
> /dev/tty0 which is in turn the same as the currently selected virtual
> terminal. Unless of course you mean to connect /dev/console to a
> serial device, which depends on actually having a serial device. All
> of this sounds incredibly stupid to me. NO device, whether local,
> remote, connected, unconnected, etc. should unconditionally allow
> random people to interfere with system processes. It's just bad,
> insecure system design.
I note with interest the number of hoops I had to jump through to get ctrl-c
to work on an "init=/bin/sh" variant, because /dev/console does _not_
actually provide those signals, and PID 1 has those signals blocked anyway.
What the guy's talking about is his init _script_, a child process of init,
being attatched to /dev/tty0 instead of /dev/console, and thus receiving
signals generated via ctrl-c or ctrl-s.
According to http://busybox.net/downloads/BusyBox.html#item_init the first
field of busybox init lines is the device to run it on (the /dev/ prefix is
optional), and the default is tty0, so you might want to change:
::sysinit:/etc/init.d/rcS
into:
console::sysinit:/etc/init.d/rcS
Not that I've tried it...
Rob
--
Never bet against the cheap plastic solution.
More information about the busybox
mailing list