Revision: 260 Author: nieklinnenbank Date: Sun Aug 2 04:35:57 2009 Log: Init now simply executes /etc/rc using /bin/sh. It does not open standard I/O nor wait for the root filesystem to mount (as it is already mounted at that time). http://code.google.com/p/freenos/source/detail?r=260 Modified: /trunk/sbin/init/Main.cpp ======================================= --- /trunk/sbin/init/Main.cpp Fri Jul 10 03:30:17 2009 +++ /trunk/sbin/init/Main.cpp Sun Aug 2 04:35:57 2009 @@ -28,22 +28,11 @@ int main(int argc, char **argv) { const char *av[] = { "/bin/sh/sh", "/etc/rc", ZERO }; - struct stat st; /* - * TODO: give up all priviledges: run us in priviledge level 0. + * TODO: give up all priviledges. */ - /* Wait for the root filesystem. */ - while (stat("/", &st) == -1) - { - ProcessCtl(ANY, Schedule); - } - /* Initialize terminal as standard I/O. */ - for (int i = 0; i < 3; i++) - { - while (open("/dev/tty0", ZERO) == -1) ; - } /* Execute the run commands file. */ forkexec("/bin/sh/sh", av);