summaryrefslogtreecommitdiffstats
path: root/usr.sbin
diff options
context:
space:
mode:
authorimp <imp@FreeBSD.org>2003-08-20 06:24:12 +0000
committerimp <imp@FreeBSD.org>2003-08-20 06:24:12 +0000
commitd7ba3dd9a7c234423f65deccc61042c9c9fcda45 (patch)
tree967b3f1f7e1093fc6645a24501223729a3621229 /usr.sbin
parentca8f17fdde609d29203cfa0f308cb5fc42a02f8f (diff)
downloadFreeBSD-src-d7ba3dd9a7c234423f65deccc61042c9c9fcda45.zip
FreeBSD-src-d7ba3dd9a7c234423f65deccc61042c9c9fcda45.tar.gz
Add a new variable 'skipPCCARD'. This variable will cause sysinstall
to ignore all PC Card devices. Submitted by: Anders Nordby PR: bin/37650 MFC After: 2 weeks
Diffstat (limited to 'usr.sbin')
-rw-r--r--usr.sbin/sade/install.c1
-rw-r--r--usr.sbin/sade/main.c4
-rw-r--r--usr.sbin/sade/sade.h1
-rw-r--r--usr.sbin/sysinstall/install.c1
-rw-r--r--usr.sbin/sysinstall/main.c4
-rw-r--r--usr.sbin/sysinstall/modules.c14
-rw-r--r--usr.sbin/sysinstall/options.c2
-rw-r--r--usr.sbin/sysinstall/sysinstall.h1
8 files changed, 26 insertions, 2 deletions
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 6d28171..9800efa 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -1157,6 +1157,7 @@ installVarDefaults(dialogMenuItem *self)
variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE, 0);
variable_set2(VAR_INSTALL_ROOT, "/", 0);
variable_set2(VAR_INSTALL_CFG, "install.cfg", 0);
+ variable_set2(VAR_SKIP_PCCARD, "NO", 0);
cp = getenv("EDITOR");
if (!cp)
cp = "/usr/bin/ee";
diff --git a/usr.sbin/sade/main.c b/usr.sbin/sade/main.c
index 3b1df90..9d805f7 100644
--- a/usr.sbin/sade/main.c
+++ b/usr.sbin/sade/main.c
@@ -112,7 +112,9 @@ main(int argc, char **argv)
/* Initialize PC-card, if we haven't already done so. */
#ifdef PCCARD_ARCH
- if (!pvariable_get("pccardInitialize")) {
+ if (!variable_cmp(VAR_SKIP_PCCARD, "YES") &&
+ variable_get(VAR_SKIP_PCCARD)!=1 &&
+ !pvariable_get("pccardInitialize")) {
pccardInitialize();
pvariable_set("pccardInitialize=1");
}
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index 9f50e3ce..684b0e3 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -194,6 +194,7 @@
#define VAR_TAPE_BLOCKSIZE "tapeBlocksize"
#define VAR_TRY_DHCP "tryDHCP"
#define VAR_TRY_RTSOL "tryRTSOL"
+#define VAR_SKIP_PCCARD "skipPCCARD"
#define VAR_UFS_PATH "ufs"
#define VAR_USR_SIZE "usrSize"
#define VAR_VAR_SIZE "varSize"
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index 6d28171..9800efa 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -1157,6 +1157,7 @@ installVarDefaults(dialogMenuItem *self)
variable_set2(VAR_TAPE_BLOCKSIZE, DEFAULT_TAPE_BLOCKSIZE, 0);
variable_set2(VAR_INSTALL_ROOT, "/", 0);
variable_set2(VAR_INSTALL_CFG, "install.cfg", 0);
+ variable_set2(VAR_SKIP_PCCARD, "NO", 0);
cp = getenv("EDITOR");
if (!cp)
cp = "/usr/bin/ee";
diff --git a/usr.sbin/sysinstall/main.c b/usr.sbin/sysinstall/main.c
index 3b1df90..9d805f7 100644
--- a/usr.sbin/sysinstall/main.c
+++ b/usr.sbin/sysinstall/main.c
@@ -112,7 +112,9 @@ main(int argc, char **argv)
/* Initialize PC-card, if we haven't already done so. */
#ifdef PCCARD_ARCH
- if (!pvariable_get("pccardInitialize")) {
+ if (!variable_cmp(VAR_SKIP_PCCARD, "YES") &&
+ variable_get(VAR_SKIP_PCCARD)!=1 &&
+ !pvariable_get("pccardInitialize")) {
pccardInitialize();
pvariable_set("pccardInitialize=1");
}
diff --git a/usr.sbin/sysinstall/modules.c b/usr.sbin/sysinstall/modules.c
index 252ad30..859994a 100644
--- a/usr.sbin/sysinstall/modules.c
+++ b/usr.sbin/sysinstall/modules.c
@@ -92,6 +92,20 @@ moduleInitialize(void)
msgConfirm("Loading module %s failed", dp->d_name);
}
}
+ if (strcmp(dp->d_name + dp->d_namlen - (sizeof(".ko.gz") - 1), ".ko.gz") == 0) {
+ snprintf(module, sizeof(module), "/tmp/%s", dp->d_name);
+ module[strlen(module) - sizeof(".gz")] = '\0';
+ snprintf(desc, sizeof(desc), "zcat < %s/%s > %s", MODULESDIR,
+ dp->d_name, module);
+ system(desc);
+ if (kldload(module) < 0 && errno != EEXIST) {
+ if (desc_str[0])
+ msgConfirm("Loading module %s failed\n%s", dp->d_name, desc_str);
+ else
+ msgConfirm("Loading module %s failed", dp->d_name);
+ }
+ unlink(module);
+ }
}
closedir(dirp);
}
diff --git a/usr.sbin/sysinstall/options.c b/usr.sbin/sysinstall/options.c
index b40bc7c..2212a13 100644
--- a/usr.sbin/sysinstall/options.c
+++ b/usr.sbin/sysinstall/options.c
@@ -122,6 +122,8 @@ static Option Options[] = {
OPT_IS_VAR, NULL, VAR_TRY_DHCP, varCheck },
{ "IPv6", "Attempt IPv6 configuration of interfaces",
OPT_IS_VAR, NULL, VAR_TRY_RTSOL, varCheck },
+{ "Skip PCCARD", "Skip PC-card probing, do not use PC-card devices for installation",
+ OPT_IS_VAR, NULL, VAR_SKIP_PCCARD, varCheck },
{ "FTP username", "Username and password to use instead of anonymous",
OPT_IS_FUNC, mediaSetFTPUserPass, VAR_FTP_USER, varCheck },
{ "Editor", "Which text editor to use during installation",
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index 9f50e3ce..684b0e3 100644
--- a/usr.sbin/sysinstall/sysinstall.h
+++ b/usr.sbin/sysinstall/sysinstall.h
@@ -194,6 +194,7 @@
#define VAR_TAPE_BLOCKSIZE "tapeBlocksize"
#define VAR_TRY_DHCP "tryDHCP"
#define VAR_TRY_RTSOL "tryRTSOL"
+#define VAR_SKIP_PCCARD "skipPCCARD"
#define VAR_UFS_PATH "ufs"
#define VAR_USR_SIZE "usrSize"
#define VAR_VAR_SIZE "varSize"
OpenPOWER on IntegriCloud