[ale] Init as a shell script
Chris Fowler
ChrisF at computone.com
Tue May 1 17:02:08 EDT 2001
I am creating a bootable floppy disk that uses kernel 2.4.4 and my init is basically written as a ash shell script.
I'm getting an error like
sh: can't open tty
tty is in /dev. I'm thinking I need to write something in C that looks kinda like this:
int
main(void)
{
       open(STDIN, O_RDONLY);
       open(STDOUT, O_WRONLY);
       open(STDERR, O_WRONLY);
       execvp("/sbin/myshell","/sbin/myshell", 0);
      Â
       return 0; // We never get here!
}
But, I have no space to place a static program and libc it 1.2megs stripped. Any suggestions?
Thanks,
Chris
More information about the Ale
mailing list