diff --git a/src/bin/init/Makefile b/src/bin/init/Makefile index c7b32a8..4464bec 100644 --- a/src/bin/init/Makefile +++ b/src/bin/init/Makefile @@ -9,7 +9,7 @@ LD = ld #Binary File Name -BINARY = init +BINARY = ttyd #Delete Program REMOVE = rm -f @@ -20,7 +20,7 @@ #Startup File STARTUP = ../../lib/ubix/startup.o -#LIBRARIES = ../../lib/libc/libc.so +LIBRARIES = ../../lib/libc_old/libc_old.so # Link The Binary $(BINARY) : $(OBJS) diff --git a/src/bin/init/main.c b/src/bin/init/main.c index 9b6b702..799b51e 100644 --- a/src/bin/init/main.c +++ b/src/bin/init/main.c @@ -29,29 +29,14 @@ #include #include -#include -#include -#include #include +#include int main(int argc,char **argv) { - int i=0x0; + int i = 0x0; + int *x = 0x0; mpi_message_t myMsg; - /* Create a mailbox for this task */ - if (mpi_createMbox("init") != 0x0) { - printf("Error: Failed to creating mail box: init\n"); - exit(0x1); - } - - /* Make sure we have superuser permissions if not exit */ - if ((getuid() != 0x0) && (getgid() != 0x0)) { - printf("Error: This program must be run by root.\n"); - exit(0x1); - } - - printf("Initializing UbixOS\n"); - /* Start TTYD */ i = fork(); if (0x0 == i) { @@ -63,49 +48,22 @@ sched_yield(); - i = fork(); - if (0x0 == i) { - printf("Starting Ubix Registry (ubistry)\n"); - exec("sys:/ubistry",0x0,0x0); - printf("Error: Error Starting ubistry\n"); - exit(0x0); - } - while (pidStatus(i) > 0x0) { - sched_yield(); - } - - startup: - i = fork(); - if (0 == i) { - printf("Starting Login Daemon.\n"); - exec("sys:/login",0x0,0x0); - printf("Error Starting System\n"); - exit(0x0); - } - - while (pidStatus(i) > 0x0) { - fetchAgain: - if (mpi_fetchMessage("init",&myMsg) == 0x0) { - switch (myMsg.header) { - case 10: - printf("Exec: (%s)\n",myMsg.data); - break; - default: - printf("MailBox: init Received Message %i:%s\n",myMsg.header,myMsg.data); - break; - } - goto fetchAgain; - } - sched_yield(); - } - printf("login exited?"); - goto startup; + printf("Initializing TTYD\n"); + myMsg.header = 0x69; + x = (int *)&myMsg.data; + *x = 0x4; + printf("mpi_post: [%i]\n",mpi_postMessage("system",0x2,&myMsg)); + printf("PID: [%i]\n",getpid()); + printf("Holler!!!!\n"); return(0x0); } /*** $Log$ + Revision 1.17 2004/08/14 11:23:02 reddawg + Changes + Revision 1.16 2004/08/01 20:47:59 reddawg Minor changes @@ -162,3 +120,4 @@ END ***/ +