diff options
author | jkh <jkh@FreeBSD.org> | 2000-02-25 20:55:15 +0000 |
---|---|---|
committer | jkh <jkh@FreeBSD.org> | 2000-02-25 20:55:15 +0000 |
commit | 056294e1461659ca4550427c91cc02241a37657a (patch) | |
tree | ad4a62bf3c576c6a0844fd9c13d57254de935acd /usr.sbin/sade/system.c | |
parent | 37325dc4d2abf0e9c0b5e80933d3e0d4e955e0d1 (diff) | |
download | FreeBSD-src-056294e1461659ca4550427c91cc02241a37657a.zip FreeBSD-src-056294e1461659ca4550427c91cc02241a37657a.tar.gz |
Make sysinstall use the new debug.boothowto OID. It will now go
straight into debug mode if you boot -v. Also conditionalize some
annoying debugging output now that we have this ability.
Partially submitted by: msmith
Approved by: jkh [to make certain wise-acres happy ;)]
Diffstat (limited to 'usr.sbin/sade/system.c')
-rw-r--r-- | usr.sbin/sade/system.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/usr.sbin/sade/system.c b/usr.sbin/sade/system.c index dfe3889..aaca077 100644 --- a/usr.sbin/sade/system.c +++ b/usr.sbin/sade/system.c @@ -72,13 +72,16 @@ expand(char *fname) void systemInitialize(int argc, char **argv) { -#ifdef __alpha__ - int i; -#endif + int i, boothowto; signal(SIGINT, SIG_IGN); globalsInit(); + i = sizeof(boothowto); + if (!sysctlbyname("debug.boothowto", &boothowto, &i, NULL, NULL) && + (i == sizeof(boothowto)) && (boothowto & RB_VERBOSE)) + variable_set2(VAR_DEBUG, "YES", 0); + /* Are we running as init? */ if (getpid() == 1) { int fd, type; @@ -243,7 +246,8 @@ systemHelpFile(char *file, char *buf) { if (!file) return NULL; - + if (file[0] == '/') + return file; snprintf(buf, FILENAME_MAX, "/stand/help/%s.hlp.gz", file); if (file_readable(buf)) return expand(buf); |