system.c (17375) | system.c (18502) |
---|---|
1/* 2 * The new sysinstall program. 3 * 4 * This is probably the last program in the `sysinstall' line - the next 5 * generation being essentially a complete rewrite. 6 * | 1/* 2 * The new sysinstall program. 3 * 4 * This is probably the last program in the `sysinstall' line - the next 5 * generation being essentially a complete rewrite. 6 * |
7 * $Id: system.c,v 1.62 1996/07/10 11:38:29 jkh Exp $ | 7 * $Id: system.c,v 1.63 1996/08/01 10:58:54 jkh Exp $ |
8 * 9 * Jordan Hubbard 10 * 11 * My contributions are in the public domain. 12 * 13 * Parts of this file are also blatently stolen from Poul-Henning Kamp's 14 * previous version of sysinstall, and as such fall under his "BEERWARE license" 15 * so buy him a beer if you like it! Buy him a beer for me, too! --- 44 unchanged lines hidden (view full) --- 60 61 62 signal(SIGINT, SIG_IGN); 63 globalsInit(); 64 65 /* Are we running as init? */ 66 if (getpid() == 1) { 67 setsid(); | 8 * 9 * Jordan Hubbard 10 * 11 * My contributions are in the public domain. 12 * 13 * Parts of this file are also blatently stolen from Poul-Henning Kamp's 14 * previous version of sysinstall, and as such fall under his "BEERWARE license" 15 * so buy him a beer if you like it! Buy him a beer for me, too! --- 44 unchanged lines hidden (view full) --- 60 61 62 signal(SIGINT, SIG_IGN); 63 globalsInit(); 64 65 /* Are we running as init? */ 66 if (getpid() == 1) { 67 setsid(); |
68 close(0); open("/dev/ttyv0", O_RDWR); | 68 close(0); 69 if (open("/dev/ttyv0", O_RDWR) < 0) 70 open("/dev/console", O_RDWR); 71 else 72 OnVTY = TRUE; |
69 close(1); dup(0); 70 close(2); dup(0); 71 printf("%s running as init\n", argv[0]); 72 RunningAsInit = 1; 73 i = ioctl(0, TIOCSCTTY, (char *)NULL); 74 setlogin("root"); 75 setenv("PATH", "/stand:/bin:/sbin:/usr/sbin:/usr/bin:/mnt/bin:/mnt/sbin:/mnt/usr/sbin:/mnt/usr/bin:/usr/X11R6/bin", 1); 76 setbuf(stdin, 0); --- 239 unchanged lines hidden --- | 73 close(1); dup(0); 74 close(2); dup(0); 75 printf("%s running as init\n", argv[0]); 76 RunningAsInit = 1; 77 i = ioctl(0, TIOCSCTTY, (char *)NULL); 78 setlogin("root"); 79 setenv("PATH", "/stand:/bin:/sbin:/usr/sbin:/usr/bin:/mnt/bin:/mnt/sbin:/mnt/usr/sbin:/mnt/usr/bin:/usr/X11R6/bin", 1); 80 setbuf(stdin, 0); --- 239 unchanged lines hidden --- |