summaryrefslogtreecommitdiffstats
path: root/usr.sbin/sade/main.c
diff options
context:
space:
mode:
authormurray <murray@FreeBSD.org>2001-09-24 10:16:23 +0000
committermurray <murray@FreeBSD.org>2001-09-24 10:16:23 +0000
commit5db7811e708c1fdf315431ddd6deed09f2cc87b4 (patch)
tree93adea49800e8fdf86444bd44855929cfc0c2970 /usr.sbin/sade/main.c
parente97a4764bb4efd497473925f8645c948290bd743 (diff)
downloadFreeBSD-src-5db7811e708c1fdf315431ddd6deed09f2cc87b4.zip
FreeBSD-src-5db7811e708c1fdf315431ddd6deed09f2cc87b4.tar.gz
Add a couple of functions to create persistent variables that will
survive a sysinstall Ctrl-C -> 'Restart'. This fixes another annoying bug where restarting sysinstall will try to reload kernel modules and do other external things that have already been done. For now, use these persistent variables to keep track of module, usbd, and pccardd initialization. Bug found by: rwatson MFC after: 1 week
Diffstat (limited to 'usr.sbin/sade/main.c')
-rw-r--r--usr.sbin/sade/main.c22
1 files changed, 16 insertions, 6 deletions
diff --git a/usr.sbin/sade/main.c b/usr.sbin/sade/main.c
index 19d1c0a..a562029 100644
--- a/usr.sbin/sade/main.c
+++ b/usr.sbin/sade/main.c
@@ -101,14 +101,24 @@ main(int argc, char **argv)
if (DebugFD)
dup2(DebugFD, 2);
- /* Initialize driver modules */
- moduleInitialize();
+ /* Initialize driver modules, if we haven't already done so (ie,
+ the user hit Ctrl-C -> Restart. */
+ if (!pvariable_get("modulesInitialize")) {
+ moduleInitialize();
+ pvariable_set("modulesInitialize=1");
+ }
- /* Initialize PC-card */
- pccardInitialize();
+ /* Initialize PC-card, if we haven't already done so. */
+ if (!pvariable_get("pccardInitialize")) {
+ pccardInitialize();
+ pvariable_set("pccardInitialize=1");
+ }
- /* Initialize USB */
- usbInitialize();
+ /* Initialize USB, if we haven't already done so. */
+ if (!pvariable_get("usbInitialize")) {
+ usbInitialize();
+ pvariable_set("usbInitialize=1");
+ }
/* Probe for all relevant devices on the system */
deviceGetAll();
OpenPOWER on IntegriCloud