[klibc] console-sanity tool in klibc?

David Härdeman david at hardeman.nu
Wed Jul 9 03:17:30 PDT 2008


Hi all,

in a somewhat unrelated discussion, a user wanted to run gpg in an
initramfs generated by the Debian initramfs-tools package. Whether that is
a good idea or not is a different discussion, but he noted that /dev/tty
won't work in the initramfs because no controlling console has been setup
yet (I think init is the first program to do so).

So, I was wondering if it might be a good idea to provide a tool in klibc
(say "console_sanity") which does the console magic that sysvinit normally
does (like TIOCSCTTY and tcsetattr)? Potientially it could be expanded in
the future to also support loading keymaps and other bonus stuff like
setting the console in utf-8 mode...

It should benefit any initramfs-included shell as well since a working
/dev/tty means that job control and key combinations like ctrl-c will work
without any magic in the shell itself.

-- 
David Härdeman



More information about the klibc mailing list