system.c (14670) | system.c (14738) |
---|---|
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.47 1996/03/02 07:31:56 jkh Exp $ | 7 * $Id: system.c,v 1.48 1996/03/18 15:28:08 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! --- 196 unchanged lines hidden (view full) --- 212 pid = fork(); 213 if (pid == -1) { 214 (void)sigsetmask(omask); 215 i = 127; 216 } 217 else if (!pid) { /* Junior */ 218 (void)sigsetmask(omask); 219 if (DebugFD != -1) { | 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! --- 196 unchanged lines hidden (view full) --- 212 pid = fork(); 213 if (pid == -1) { 214 (void)sigsetmask(omask); 215 i = 127; 216 } 217 else if (!pid) { /* Junior */ 218 (void)sigsetmask(omask); 219 if (DebugFD != -1) { |
220 if (OnVTY && isDebug()) | 220 if (OnVTY && isDebug() && RunningAsInit) |
221 msgInfo("Command output is on VTY2 - type ALT-F2 to see it"); 222 dup2(DebugFD, 0); 223 dup2(DebugFD, 1); 224 dup2(DebugFD, 2); 225 } 226 execl("/stand/sh", "sh", "-c", cmd, (char *)NULL); 227 exit(1); 228 } --- 10 unchanged lines hidden (view full) --- 239 free(cmd); 240 } 241 return i; 242} 243 244void 245systemCreateHoloshell(void) 246{ | 221 msgInfo("Command output is on VTY2 - type ALT-F2 to see it"); 222 dup2(DebugFD, 0); 223 dup2(DebugFD, 1); 224 dup2(DebugFD, 2); 225 } 226 execl("/stand/sh", "sh", "-c", cmd, (char *)NULL); 227 exit(1); 228 } --- 10 unchanged lines hidden (view full) --- 239 free(cmd); 240 } 241 return i; 242} 243 244void 245systemCreateHoloshell(void) 246{ |
247 if (OnVTY) { | 247 if (OnVTY && RunningAsInit) { |
248 if (!fork()) { 249 int i, fd; 250 struct termios foo; 251 extern int login_tty(int); 252 253 for (i = 0; i < 64; i++) 254 close(i); 255 DebugFD = fd = open("/dev/ttyv3", O_RDWR); --- 21 unchanged lines hidden --- | 248 if (!fork()) { 249 int i, fd; 250 struct termios foo; 251 extern int login_tty(int); 252 253 for (i = 0; i < 64; i++) 254 close(i); 255 DebugFD = fd = open("/dev/ttyv3", O_RDWR); --- 21 unchanged lines hidden --- |