[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[ale] Init as a shell script






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