main.c (15242) | main.c (15439) |
---|---|
1/* 2 * The new sysinstall program. 3 * 4 * This is probably the last attempt in the `sysinstall' line, the next 5 * generation being slated for what's essentially a complete rewrite. 6 * | 1/* 2 * The new sysinstall program. 3 * 4 * This is probably the last attempt in the `sysinstall' line, the next 5 * generation being slated for what's essentially a complete rewrite. 6 * |
7 * $Id: main.c,v 1.16 1996/04/07 03:52:31 jkh Exp $ | 7 * $Id: main.c,v 1.17 1996/04/13 13:31:51 jkh Exp $ |
8 * 9 * Copyright (c) 1995 10 * Jordan Hubbard. All rights reserved. 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 * 1. Redistributions of source code must retain the above copyright --- 44 unchanged lines hidden (view full) --- 60 if (geteuid() != 0) { 61 fprintf(stderr, "Error: This utility should only be run as root.\n"); 62 return 1; 63 } 64 65 /* Set up whatever things need setting up */ 66 systemInitialize(argc, argv); 67 | 8 * 9 * Copyright (c) 1995 10 * Jordan Hubbard. All rights reserved. 11 * 12 * Redistribution and use in source and binary forms, with or without 13 * modification, are permitted provided that the following conditions 14 * are met: 15 * 1. Redistributions of source code must retain the above copyright --- 44 unchanged lines hidden (view full) --- 60 if (geteuid() != 0) { 61 fprintf(stderr, "Error: This utility should only be run as root.\n"); 62 return 1; 63 } 64 65 /* Set up whatever things need setting up */ 66 systemInitialize(argc, argv); 67 |
68 /* Set default flag and variable values */ 69 installVarDefaults(NULL); 70 71 if (argc > 1 && !strcmp(argv[1], "-fake")) { 72 variable_set2(VAR_DEBUG, "YES"); 73 Fake = TRUE; 74 msgConfirm("I'll be just faking it from here on out, OK?"); 75 } 76 |
|
68 /* Try to preserve our scroll-back buffer */ 69 if (OnVTY) 70 for (curr = 0; curr < 25; curr++) 71 putchar('\n'); 72 73 /* Probe for all relevant devices on the system */ 74 deviceGetAll(); 75 | 77 /* Try to preserve our scroll-back buffer */ 78 if (OnVTY) 79 for (curr = 0; curr < 25; curr++) 80 putchar('\n'); 81 82 /* Probe for all relevant devices on the system */ 83 deviceGetAll(); 84 |
76 /* Set default flag and variable values */ 77 installVarDefaults(NULL); 78 | |
79 /* Begin user dialog at outer menu */ 80 while (1) { 81 choice = scroll = curr = max = 0; 82 dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max); 83 if (getpid() != 1 || !msgYesNo("Are you sure you wish to exit? The system will reboot\n" 84 "(be sure to remove any floppies from the drives).")) 85 break; 86 } 87 88 /* Say goodnight, Gracie */ 89 systemShutdown(); 90 91 /* If we're running as init, we should never get here */ 92 return 0; 93} | 85 /* Begin user dialog at outer menu */ 86 while (1) { 87 choice = scroll = curr = max = 0; 88 dmenuOpen(&MenuInitial, &choice, &scroll, &curr, &max); 89 if (getpid() != 1 || !msgYesNo("Are you sure you wish to exit? The system will reboot\n" 90 "(be sure to remove any floppies from the drives).")) 91 break; 92 } 93 94 /* Say goodnight, Gracie */ 95 systemShutdown(); 96 97 /* If we're running as init, we should never get here */ 98 return 0; 99} |