Re: Does control-C from console interrupt ash script execution?
On Wednesday 27 June 2007 17:35, Dallas Clement wrote: Hello All, I am executing an ash init script from initramfs. I have only the console for I/O at this time -- no TTYs available. My init script prompts for input like so: printf is that correct? (y|n) - read confirm Should I be able to interrupt ash script execution with a control-C? I am trying to trap it in my script as follows: trap abort 2 No, it won't work. Ctrl-C, Ctrl-Z etc have special meaning only when they come from controlling tty. /dev/console cannot be a controlling tty in Linux. (there is code in kernel which disallows this). See cttyhack (and its help text) in newer busybox. -- vda ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
Re: Does control-C from console interrupt ash script execution?
On Fri, 2007-06-29 at 18:18 +0200, Denis Vlasenko wrote: On Wednesday 27 June 2007 17:35, Dallas Clement wrote: Hello All, I am executing an ash init script from initramfs. I have only the console for I/O at this time -- no TTYs available. My init script prompts for input like so: printf is that correct? (y|n) - read confirm Should I be able to interrupt ash script execution with a control-C? I am trying to trap it in my script as follows: trap abort 2 No, it won't work. Ctrl-C, Ctrl-Z etc have special meaning only when they come from controlling tty. /dev/console cannot be a controlling tty in Linux. (there is code in kernel which disallows this). See cttyhack (and its help text) in newer busybox. -- vda Thanks for the reply. Can I hi-jack my PC VGA port with getty then to get a controlling terminal? I'd like to avoid forcing a login. I'm trying to do this from an init script. ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox
Does control-C from console interrupt ash script execution?
Hello All, I am executing an ash init script from initramfs. I have only the console for I/O at this time -- no TTYs available. My init script prompts for input like so: printf is that correct? (y|n) - read confirm Should I be able to interrupt ash script execution with a control-C? I am trying to trap it in my script as follows: trap abort 2 In case you are wondering, 'abort' is a shell script function. Thanks, Dallas ___ busybox mailing list busybox@busybox.net http://busybox.net/cgi-bin/mailman/listinfo/busybox