Tiny Core Linux
Tiny Core Base => TCB Talk => Topic started by: maro on February 10, 2012, 07:57:03 PM
-
As I'm quite lazy I wonder whether it would be possible to include a ca. 65 byte long (or rather short) command sequence as an additional script (e.g. '/sbin/ctty-hack') in Core:
#!/bin/sh
exec setsid sh -c 'exec sh </dev/tty1 >/dev/tty1 2>&1'
The purpose is to work around the Busybox shell limitation described in their FAQ (http://busybox.net/FAQ.html#job_control) (i.e. when one starts Core with boot code 'rdinit=/bin/sh' one ends up with a situation where the TTY is '/dev/console', that means that one can't use the likes of 'Ctrl-C' or 'Ctrl-Z' or that 'less' won't work).
An alternative would be to include one more applet (i.e. 'cttyhack') in the BusyBox build (e.g. via 'CONFIG_CTTYHACK=y'), but even though the source is really small, it might still be more than a 65 bytes increase (plus it would require to wait for the next BusyBox re-built).
-
Done. Added /sbin/ctty-hack
-
Thank you, Robert. I really appreciate that you are willing to support even such a rather "fringe use case".