summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjkh <jkh@FreeBSD.org>2000-02-29 10:40:59 +0000
committerjkh <jkh@FreeBSD.org>2000-02-29 10:40:59 +0000
commit8905bd306e55ccfa2a8ee59d95e9ed5bc3785f8a (patch)
tree86307e06f2ef1119a459d79e6433486546aa6a95
parent35e15b09be3df921694ae02d3105e751fa8fa411 (diff)
downloadFreeBSD-src-8905bd306e55ccfa2a8ee59d95e9ed5bc3785f8a.zip
FreeBSD-src-8905bd306e55ccfa2a8ee59d95e9ed5bc3785f8a.tar.gz
o Add support for loading the rsaref or rsaintl packages, depending
on locale. o Allow use of "G" in label editor to stand for gigabytes. This is actually an unrelated patch which I meant to commit separately but what the heck, it's late. Partially submitted by: phk
-rw-r--r--release/sysinstall/disks.c4
-rw-r--r--release/sysinstall/globals.c2
-rw-r--r--release/sysinstall/install.c29
-rw-r--r--release/sysinstall/label.c7
-rw-r--r--release/sysinstall/package.c3
-rw-r--r--release/sysinstall/sysinstall.h4
-rw-r--r--usr.sbin/sade/disks.c4
-rw-r--r--usr.sbin/sade/globals.c2
-rw-r--r--usr.sbin/sade/install.c29
-rw-r--r--usr.sbin/sade/label.c7
-rw-r--r--usr.sbin/sade/sade.h4
-rw-r--r--usr.sbin/sysinstall/disks.c4
-rw-r--r--usr.sbin/sysinstall/globals.c2
-rw-r--r--usr.sbin/sysinstall/install.c29
-rw-r--r--usr.sbin/sysinstall/label.c7
-rw-r--r--usr.sbin/sysinstall/package.c3
-rw-r--r--usr.sbin/sysinstall/sysinstall.h4
17 files changed, 133 insertions, 11 deletions
diff --git a/release/sysinstall/disks.c b/release/sysinstall/disks.c
index 2a611b9..16be5e2 100644
--- a/release/sysinstall/disks.c
+++ b/release/sysinstall/disks.c
@@ -309,6 +309,8 @@ diskPartition(Device *dev)
if (val && (size = strtol(val, &cp, 0)) > 0) {
if (*cp && toupper(*cp) == 'M')
size *= ONE_MEG;
+ else if (*cp && toupper(*cp) == 'G')
+ size *= ONE_GIG;
strcpy(tmp, "165");
val = msgGetInput(tmp, "Enter type of partition to create:\n\n"
"Pressing Enter will choose the default, a native FreeBSD\n"
@@ -733,6 +735,8 @@ diskPartitionNonInteractive(Device *dev)
/* Look for sz bytes free */
if (*cp && toupper(*cp) == 'M')
sz *= ONE_MEG;
+ else if (*cp && toupper(*cp) == 'G')
+ sz *= ONE_GIG;
for (i = 0; chunk_info[i]; i++) {
/* If a chunk is at least sz MB, use it. */
if (chunk_info[i]->type == unused && chunk_info[i]->size >= sz) {
diff --git a/release/sysinstall/globals.c b/release/sysinstall/globals.c
index c47c3a0..9b66fab 100644
--- a/release/sysinstall/globals.c
+++ b/release/sysinstall/globals.c
@@ -47,6 +47,7 @@ Boolean RunningAsInit; /* Are we running as init? */
Boolean DialogActive; /* Is libdialog initialized? */
Boolean ColorDisplay; /* Are we on a color display? */
Boolean OnVTY; /* Are we on a VTY? */
+Boolean PkgInteractive; /* Is the package going to spew at us? */
Boolean USAResident; /* Are we cryptographically challenged? */
Variable *VarHead; /* The head of the variable chain */
Device *mediaDevice; /* Where we're installing from */
@@ -63,6 +64,7 @@ globalsInit(void)
{
DebugFD = -1;
ColorDisplay = FALSE;
+ PkgInteractive = FALSE;
Fake = FALSE;
OnVTY = FALSE;
DialogActive = FALSE;
diff --git a/release/sysinstall/install.c b/release/sysinstall/install.c
index 83972b0..7c27138 100644
--- a/release/sysinstall/install.c
+++ b/release/sysinstall/install.c
@@ -565,6 +565,35 @@ nodisks:
(void)configLinux(self);
#endif
+ dialog_clear();
+ if (USAResident) {
+ if (!msgYesNo("I see that you are \"USA_RESIDENT\" according to your earlier\n"
+ "response to the CRYPTO distribution dialog. Do you want to try and\n"
+ "load the rsaref package from the current media? Some restrictions on\n"
+ "usage may apply, so be sure to read the package installation output!")) {
+ PkgInteractive = TRUE;
+ dialog_clear();
+ if (DITEM_STATUS(package_add("rsaref")) != DITEM_SUCCESS) {
+ msgConfirm("Unable to find an rsaref package on the current intallation media.\n"
+ "You may wish to switch media types and try again, perhaps\n"
+ "from an FTP server which carries this package.");
+ }
+ PkgInteractive = FALSE;
+ dialog_clear();
+ }
+ }
+ else {
+ if (!msgYesNo("I see that you are not \"USA_RESIDENT\" according to your earlier\n"
+ "response to the CRYPTO distribution dialog. Do you want to try and\n"
+ "load the rsaintl package from the current media?")) {
+ if (DITEM_STATUS(package_add("rsaintl")) != DITEM_SUCCESS) {
+ msgConfirm("Unable to find an rsaintl package on the current intallation media.\n"
+ "You may wish to switch media types and try again, perhaps\n"
+ "from an FTP server which carries this package.");
+ }
+ }
+ }
+
dialog_clear_norefresh();
if (!msgYesNo("Does this system have a mouse attached to it?"))
dmenuOpenSimple(&MenuMouse, FALSE);
diff --git a/release/sysinstall/label.c b/release/sysinstall/label.c
index bce434e..460f194 100644
--- a/release/sysinstall/label.c
+++ b/release/sysinstall/label.c
@@ -901,8 +901,9 @@ diskLabel(Device *dev)
sprintf(osize, "%d", sz);
val = msgGetInput(osize,
- "Please specify the partition size in blocks or append a trailing M for\n"
- "megabytes or C for cylinders. %d blocks (%dMB) are free.",
+ "Please specify the partition size in blocks or append a trailing G for\n"
+ "gigabytes, M for megabytes, or C for cylinders.\n"
+ "%d blocks (%dMB) are free.",
sz, sz / ONE_MEG);
if (!val || (size = strtol(val, &cp, 0)) <= 0) {
clear_wins();
@@ -912,6 +913,8 @@ diskLabel(Device *dev)
if (*cp) {
if (toupper(*cp) == 'M')
size *= ONE_MEG;
+ else if (toupper(*cp) == 'G')
+ size *= ONE_GIG;
else if (toupper(*cp) == 'C')
size *= (label_chunk_info[here].c->disk->bios_hd * label_chunk_info[here].c->disk->bios_sect);
}
diff --git a/release/sysinstall/package.c b/release/sysinstall/package.c
index 8901d08..1959df7 100644
--- a/release/sysinstall/package.c
+++ b/release/sysinstall/package.c
@@ -167,7 +167,8 @@ package_extract(Device *dev, char *name, Boolean depended)
pid = fork();
if (!pid) {
dup2(pfd[0], 0); close(pfd[0]);
- dup2(DebugFD, 1);
+ if (!PkgInteractive)
+ dup2(DebugFD, 1);
close(2);
close(pfd[1]);
if (isDebug())
diff --git a/release/sysinstall/sysinstall.h b/release/sysinstall/sysinstall.h
index a07d4fe..2d3bf6f 100644
--- a/release/sysinstall/sysinstall.h
+++ b/release/sysinstall/sysinstall.h
@@ -174,6 +174,7 @@
/* One MB worth of blocks */
#define ONE_MEG 2048
+#define ONE_GIG (ONE_MEG * 1024)
/* Which selection attributes to use */
#define ATTR_SELECTED (ColorDisplay ? item_selected_attr : item_attr)
@@ -340,7 +341,8 @@ extern Boolean RunningAsInit; /* Are we running stand-alone? */
extern Boolean DialogActive; /* Is the dialog() stuff up? */
extern Boolean ColorDisplay; /* Are we on a color display? */
extern Boolean OnVTY; /* On a syscons VTY? */
-Boolean USAResident; /* Are we cryptographically challenged? */
+Boolean PkgInteractive; /* Is the package going to spew at us? */
+Boolean USAResident; /* Are we cryptographically challenged? */
extern Variable *VarHead; /* The head of the variable chain */
extern Device *mediaDevice; /* Where we're getting our distribution from */
extern unsigned int Dists; /* Which distributions we want */
diff --git a/usr.sbin/sade/disks.c b/usr.sbin/sade/disks.c
index 2a611b9..16be5e2 100644
--- a/usr.sbin/sade/disks.c
+++ b/usr.sbin/sade/disks.c
@@ -309,6 +309,8 @@ diskPartition(Device *dev)
if (val && (size = strtol(val, &cp, 0)) > 0) {
if (*cp && toupper(*cp) == 'M')
size *= ONE_MEG;
+ else if (*cp && toupper(*cp) == 'G')
+ size *= ONE_GIG;
strcpy(tmp, "165");
val = msgGetInput(tmp, "Enter type of partition to create:\n\n"
"Pressing Enter will choose the default, a native FreeBSD\n"
@@ -733,6 +735,8 @@ diskPartitionNonInteractive(Device *dev)
/* Look for sz bytes free */
if (*cp && toupper(*cp) == 'M')
sz *= ONE_MEG;
+ else if (*cp && toupper(*cp) == 'G')
+ sz *= ONE_GIG;
for (i = 0; chunk_info[i]; i++) {
/* If a chunk is at least sz MB, use it. */
if (chunk_info[i]->type == unused && chunk_info[i]->size >= sz) {
diff --git a/usr.sbin/sade/globals.c b/usr.sbin/sade/globals.c
index c47c3a0..9b66fab 100644
--- a/usr.sbin/sade/globals.c
+++ b/usr.sbin/sade/globals.c
@@ -47,6 +47,7 @@ Boolean RunningAsInit; /* Are we running as init? */
Boolean DialogActive; /* Is libdialog initialized? */
Boolean ColorDisplay; /* Are we on a color display? */
Boolean OnVTY; /* Are we on a VTY? */
+Boolean PkgInteractive; /* Is the package going to spew at us? */
Boolean USAResident; /* Are we cryptographically challenged? */
Variable *VarHead; /* The head of the variable chain */
Device *mediaDevice; /* Where we're installing from */
@@ -63,6 +64,7 @@ globalsInit(void)
{
DebugFD = -1;
ColorDisplay = FALSE;
+ PkgInteractive = FALSE;
Fake = FALSE;
OnVTY = FALSE;
DialogActive = FALSE;
diff --git a/usr.sbin/sade/install.c b/usr.sbin/sade/install.c
index 83972b0..7c27138 100644
--- a/usr.sbin/sade/install.c
+++ b/usr.sbin/sade/install.c
@@ -565,6 +565,35 @@ nodisks:
(void)configLinux(self);
#endif
+ dialog_clear();
+ if (USAResident) {
+ if (!msgYesNo("I see that you are \"USA_RESIDENT\" according to your earlier\n"
+ "response to the CRYPTO distribution dialog. Do you want to try and\n"
+ "load the rsaref package from the current media? Some restrictions on\n"
+ "usage may apply, so be sure to read the package installation output!")) {
+ PkgInteractive = TRUE;
+ dialog_clear();
+ if (DITEM_STATUS(package_add("rsaref")) != DITEM_SUCCESS) {
+ msgConfirm("Unable to find an rsaref package on the current intallation media.\n"
+ "You may wish to switch media types and try again, perhaps\n"
+ "from an FTP server which carries this package.");
+ }
+ PkgInteractive = FALSE;
+ dialog_clear();
+ }
+ }
+ else {
+ if (!msgYesNo("I see that you are not \"USA_RESIDENT\" according to your earlier\n"
+ "response to the CRYPTO distribution dialog. Do you want to try and\n"
+ "load the rsaintl package from the current media?")) {
+ if (DITEM_STATUS(package_add("rsaintl")) != DITEM_SUCCESS) {
+ msgConfirm("Unable to find an rsaintl package on the current intallation media.\n"
+ "You may wish to switch media types and try again, perhaps\n"
+ "from an FTP server which carries this package.");
+ }
+ }
+ }
+
dialog_clear_norefresh();
if (!msgYesNo("Does this system have a mouse attached to it?"))
dmenuOpenSimple(&MenuMouse, FALSE);
diff --git a/usr.sbin/sade/label.c b/usr.sbin/sade/label.c
index bce434e..460f194 100644
--- a/usr.sbin/sade/label.c
+++ b/usr.sbin/sade/label.c
@@ -901,8 +901,9 @@ diskLabel(Device *dev)
sprintf(osize, "%d", sz);
val = msgGetInput(osize,
- "Please specify the partition size in blocks or append a trailing M for\n"
- "megabytes or C for cylinders. %d blocks (%dMB) are free.",
+ "Please specify the partition size in blocks or append a trailing G for\n"
+ "gigabytes, M for megabytes, or C for cylinders.\n"
+ "%d blocks (%dMB) are free.",
sz, sz / ONE_MEG);
if (!val || (size = strtol(val, &cp, 0)) <= 0) {
clear_wins();
@@ -912,6 +913,8 @@ diskLabel(Device *dev)
if (*cp) {
if (toupper(*cp) == 'M')
size *= ONE_MEG;
+ else if (toupper(*cp) == 'G')
+ size *= ONE_GIG;
else if (toupper(*cp) == 'C')
size *= (label_chunk_info[here].c->disk->bios_hd * label_chunk_info[here].c->disk->bios_sect);
}
diff --git a/usr.sbin/sade/sade.h b/usr.sbin/sade/sade.h
index a07d4fe..2d3bf6f 100644
--- a/usr.sbin/sade/sade.h
+++ b/usr.sbin/sade/sade.h
@@ -174,6 +174,7 @@
/* One MB worth of blocks */
#define ONE_MEG 2048
+#define ONE_GIG (ONE_MEG * 1024)
/* Which selection attributes to use */
#define ATTR_SELECTED (ColorDisplay ? item_selected_attr : item_attr)
@@ -340,7 +341,8 @@ extern Boolean RunningAsInit; /* Are we running stand-alone? */
extern Boolean DialogActive; /* Is the dialog() stuff up? */
extern Boolean ColorDisplay; /* Are we on a color display? */
extern Boolean OnVTY; /* On a syscons VTY? */
-Boolean USAResident; /* Are we cryptographically challenged? */
+Boolean PkgInteractive; /* Is the package going to spew at us? */
+Boolean USAResident; /* Are we cryptographically challenged? */
extern Variable *VarHead; /* The head of the variable chain */
extern Device *mediaDevice; /* Where we're getting our distribution from */
extern unsigned int Dists; /* Which distributions we want */
diff --git a/usr.sbin/sysinstall/disks.c b/usr.sbin/sysinstall/disks.c
index 2a611b9..16be5e2 100644
--- a/usr.sbin/sysinstall/disks.c
+++ b/usr.sbin/sysinstall/disks.c
@@ -309,6 +309,8 @@ diskPartition(Device *dev)
if (val && (size = strtol(val, &cp, 0)) > 0) {
if (*cp && toupper(*cp) == 'M')
size *= ONE_MEG;
+ else if (*cp && toupper(*cp) == 'G')
+ size *= ONE_GIG;
strcpy(tmp, "165");
val = msgGetInput(tmp, "Enter type of partition to create:\n\n"
"Pressing Enter will choose the default, a native FreeBSD\n"
@@ -733,6 +735,8 @@ diskPartitionNonInteractive(Device *dev)
/* Look for sz bytes free */
if (*cp && toupper(*cp) == 'M')
sz *= ONE_MEG;
+ else if (*cp && toupper(*cp) == 'G')
+ sz *= ONE_GIG;
for (i = 0; chunk_info[i]; i++) {
/* If a chunk is at least sz MB, use it. */
if (chunk_info[i]->type == unused && chunk_info[i]->size >= sz) {
diff --git a/usr.sbin/sysinstall/globals.c b/usr.sbin/sysinstall/globals.c
index c47c3a0..9b66fab 100644
--- a/usr.sbin/sysinstall/globals.c
+++ b/usr.sbin/sysinstall/globals.c
@@ -47,6 +47,7 @@ Boolean RunningAsInit; /* Are we running as init? */
Boolean DialogActive; /* Is libdialog initialized? */
Boolean ColorDisplay; /* Are we on a color display? */
Boolean OnVTY; /* Are we on a VTY? */
+Boolean PkgInteractive; /* Is the package going to spew at us? */
Boolean USAResident; /* Are we cryptographically challenged? */
Variable *VarHead; /* The head of the variable chain */
Device *mediaDevice; /* Where we're installing from */
@@ -63,6 +64,7 @@ globalsInit(void)
{
DebugFD = -1;
ColorDisplay = FALSE;
+ PkgInteractive = FALSE;
Fake = FALSE;
OnVTY = FALSE;
DialogActive = FALSE;
diff --git a/usr.sbin/sysinstall/install.c b/usr.sbin/sysinstall/install.c
index 83972b0..7c27138 100644
--- a/usr.sbin/sysinstall/install.c
+++ b/usr.sbin/sysinstall/install.c
@@ -565,6 +565,35 @@ nodisks:
(void)configLinux(self);
#endif
+ dialog_clear();
+ if (USAResident) {
+ if (!msgYesNo("I see that you are \"USA_RESIDENT\" according to your earlier\n"
+ "response to the CRYPTO distribution dialog. Do you want to try and\n"
+ "load the rsaref package from the current media? Some restrictions on\n"
+ "usage may apply, so be sure to read the package installation output!")) {
+ PkgInteractive = TRUE;
+ dialog_clear();
+ if (DITEM_STATUS(package_add("rsaref")) != DITEM_SUCCESS) {
+ msgConfirm("Unable to find an rsaref package on the current intallation media.\n"
+ "You may wish to switch media types and try again, perhaps\n"
+ "from an FTP server which carries this package.");
+ }
+ PkgInteractive = FALSE;
+ dialog_clear();
+ }
+ }
+ else {
+ if (!msgYesNo("I see that you are not \"USA_RESIDENT\" according to your earlier\n"
+ "response to the CRYPTO distribution dialog. Do you want to try and\n"
+ "load the rsaintl package from the current media?")) {
+ if (DITEM_STATUS(package_add("rsaintl")) != DITEM_SUCCESS) {
+ msgConfirm("Unable to find an rsaintl package on the current intallation media.\n"
+ "You may wish to switch media types and try again, perhaps\n"
+ "from an FTP server which carries this package.");
+ }
+ }
+ }
+
dialog_clear_norefresh();
if (!msgYesNo("Does this system have a mouse attached to it?"))
dmenuOpenSimple(&MenuMouse, FALSE);
diff --git a/usr.sbin/sysinstall/label.c b/usr.sbin/sysinstall/label.c
index bce434e..460f194 100644
--- a/usr.sbin/sysinstall/label.c
+++ b/usr.sbin/sysinstall/label.c
@@ -901,8 +901,9 @@ diskLabel(Device *dev)
sprintf(osize, "%d", sz);
val = msgGetInput(osize,
- "Please specify the partition size in blocks or append a trailing M for\n"
- "megabytes or C for cylinders. %d blocks (%dMB) are free.",
+ "Please specify the partition size in blocks or append a trailing G for\n"
+ "gigabytes, M for megabytes, or C for cylinders.\n"
+ "%d blocks (%dMB) are free.",
sz, sz / ONE_MEG);
if (!val || (size = strtol(val, &cp, 0)) <= 0) {
clear_wins();
@@ -912,6 +913,8 @@ diskLabel(Device *dev)
if (*cp) {
if (toupper(*cp) == 'M')
size *= ONE_MEG;
+ else if (toupper(*cp) == 'G')
+ size *= ONE_GIG;
else if (toupper(*cp) == 'C')
size *= (label_chunk_info[here].c->disk->bios_hd * label_chunk_info[here].c->disk->bios_sect);
}
diff --git a/usr.sbin/sysinstall/package.c b/usr.sbin/sysinstall/package.c
index 8901d08..1959df7 100644
--- a/usr.sbin/sysinstall/package.c
+++ b/usr.sbin/sysinstall/package.c
@@ -167,7 +167,8 @@ package_extract(Device *dev, char *name, Boolean depended)
pid = fork();
if (!pid) {
dup2(pfd[0], 0); close(pfd[0]);
- dup2(DebugFD, 1);
+ if (!PkgInteractive)
+ dup2(DebugFD, 1);
close(2);
close(pfd[1]);
if (isDebug())
diff --git a/usr.sbin/sysinstall/sysinstall.h b/usr.sbin/sysinstall/sysinstall.h
index a07d4fe..2d3bf6f 100644
--- a/usr.sbin/sysinstall/sysinstall.h
+++ b/usr.sbin/sysinstall/sysinstall.h
@@ -174,6 +174,7 @@
/* One MB worth of blocks */
#define ONE_MEG 2048
+#define ONE_GIG (ONE_MEG * 1024)
/* Which selection attributes to use */
#define ATTR_SELECTED (ColorDisplay ? item_selected_attr : item_attr)
@@ -340,7 +341,8 @@ extern Boolean RunningAsInit; /* Are we running stand-alone? */
extern Boolean DialogActive; /* Is the dialog() stuff up? */
extern Boolean ColorDisplay; /* Are we on a color display? */
extern Boolean OnVTY; /* On a syscons VTY? */
-Boolean USAResident; /* Are we cryptographically challenged? */
+Boolean PkgInteractive; /* Is the package going to spew at us? */
+Boolean USAResident; /* Are we cryptographically challenged? */
extern Variable *VarHead; /* The head of the variable chain */
extern Device *mediaDevice; /* Where we're getting our distribution from */
extern unsigned int Dists; /* Which distributions we want */
OpenPOWER on IntegriCloud