Howdy, my fellow derivists! I want to run a program with a complex (ie, non-debconf-style) UI in installerspace. I'm not trying to support the graphical installer, so I only need a console-compatible solution. For those unfamiliar, debian-installer runs an instance of debconf, which runs main-menu as a child process. Stdout/stdin is used as a channel for ASCII-based IPC. The best I've hit upon thus far involves invoking the complex program using openvt(1), followed on success by a chvt(1) to that terminal. chvt(1) exits immediately, so I then spin on a sh read call in the original terminal. Meanwhile, the complex process kills its parent process when it exits. This solution is messy. The terminal used by openvt is dependent on previous openvt calls and inittab. I could probably extract it from /proc, but that's also pretty gross. Since I don't want an error to always be returned, I have to spawn two processes prior to spawning the complex process (so it can kill its parent, and the grandparent can hide the error). I only signal termination now, not error/failure, though I could differentiate that using different signals and interpreting the return code in the grandparent. The user can go back to tty1 via alt+fn1, making obvious the bipartite nature of the solution. Any better ideas from derivatives land? -- nick black http://www.sprezzatech.com -- unix and hpc consulting to make an apple pie from scratch, you need first invent a universe.
Attachment:
signature.asc
Description: Digital signature