summaryrefslogtreecommitdiffstats
path: root/release/sysinstall/main.c
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>1996-04-07 03:52:36 +0000
committerjkh <jkh@FreeBSD.org>1996-04-07 03:52:36 +0000
commit61af07d0231e53139c2d8c49081a0f43da46af74 (patch)
treea289c0714788a15dfb0bcf3c9030a3425c5072c3 /release/sysinstall/main.c
parent318997a39fbec1e8347a1ff0431ca2713799510f (diff)
downloadFreeBSD-src-61af07d0231e53139c2d8c49081a0f43da46af74.zip
FreeBSD-src-61af07d0231e53139c2d8c49081a0f43da46af74.tar.gz
Major surgery.
1. Use new dialog menu hacks (no strings, just arrays of dialogMenuItem structs) so that I can create composite menus with radio/checkbox/... items in them, removing some long-standing UI bogons in various menus. This work isn't finished yet, but will be done in two phases. This is phase one. 2. Remove all the script installation stuff. I never got time to document it, it was arcane and it just complicated much of the code. There are better ways of doing this if I want to do auto-driven installations later. 3. Remove much dead code and otherwise attempt to remove as much historical grot as possible so that this code is easier to hack on. This is also a two-stage process, phase one of which is now complete.
Diffstat (limited to 'release/sysinstall/main.c')
-rw-r--r--release/sysinstall/main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/release/sysinstall/main.c b/release/sysinstall/main.c
index a94f133..9810b48 100644
--- a/release/sysinstall/main.c
+++ b/release/sysinstall/main.c
@@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
- * $Id: main.c,v 1.14 1995/09/18 16:52:29 peter Exp $
+ * $Id: main.c,v 1.15 1995/12/07 10:33:55 peter Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@@ -57,14 +57,18 @@ main(int argc, char **argv)
{
int choice, scroll, curr, max;
+ /* Catch fatal signals and complain about them if running as init */
if (getpid() == 1) {
signal(SIGBUS, screech);
signal(SIGSEGV, screech);
}
+
+ /* We don't work too well when running as non-root anymore */
if (geteuid() != 0) {
- fprintf(stderr, "Warning: This utility should be run as root.\n");
- sleep(1);
+ fprintf(stderr, "Error: This utility should only be run as root.\n");
+ return 1;
}
+
/* Set up whatever things need setting up */
systemInitialize(argc, argv);
OpenPOWER on IntegriCloud