Remove the bogus check against "none" for release names (which

really doesn't make any sense, what was I smoking) and allow
the more canonical usage of "any" for either side of the comparison
for release name or architecture (meaning you can also set CD_VERSION=any
in a cdrom.inf file to cause sysinstall to always match it and likewise
with the architecture, if specified).

Sensibly suggested by:	Makoto MATSUSHITA <matusita@jp.FreeBSD.org>
This commit is contained in:
Jordan K. Hubbard 2000-09-22 08:13:36 +00:00
parent a98588331c
commit 5e90bdab10
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=66225
6 changed files with 22 additions and 18 deletions

View file

@ -122,9 +122,10 @@ mediaInitCDROM(Device *dev)
"try again.", mountpoint);
}
else {
if (variable_cmp(VAR_RELNAME, cp)
&& variable_cmp(VAR_RELNAME, "none")
&& variable_cmp(VAR_RELNAME, "any") && !bogusCDOK) {
if (variable_cmp(VAR_RELNAME, cp) &&
variable_cmp(VAR_RELNAME, "any") &&
variable_cmp(cp, "any") &&
!bogusCDOK) {
msgConfirm("Warning: The version of the FreeBSD CD currently in the drive\n"
"(%s) does not match the version of the boot floppy\n"
"(%s).\n\n"
@ -143,10 +144,11 @@ mediaInitCDROM(Device *dev)
bogusCDOK = TRUE;
}
if ((cp = property_find(cd_attr, "CD_MACHINE_ARCH")) != NULL) {
if (strcmp(cp, "any") &&
#ifdef __alpha__
if (strcmp(cp, "alpha")) {
strcmp(cp, "alpha")) {
#else
if (strcmp(cp, "x86")) {
strcmp(cp, "x86")) {
#endif
msgConfirm("Fatal: The FreeBSD install CD currently in the drive\n"
"is for the %s architecture, not the machine you're using.\n\n"

View file

@ -149,11 +149,11 @@ mediaInitFTP(Device *dev)
/*
* Now that we've verified that the path we're given is ok, let's try to
* be a bit intelligent in locating the release we are looking for. First
* off, if the release is specified as "__RELEASE" or "none", then just
* off, if the release is specified as "__RELEASE" or "any", then just
* assume that the current directory is the one we want and give up.
*/
rel = variable_get(VAR_RELNAME);
if (strcmp(rel, "__RELEASE") && strcmp(rel, "none")) {
if (strcmp(rel, "__RELEASE") && strcmp(rel, "any")) {
/*
* Ok, since we have a release variable, let's walk through the list
* of directories looking for a release directory. The first one to
@ -182,7 +182,7 @@ mediaInitFTP(Device *dev)
"FTP server. You may need to visit a different server for\n"
"the release you are trying to fetch or go to the Options\n"
"menu and to set the release name to explicitly match what's\n"
"available on %s (or set to \"none\").\n\n"
"available on %s (or set to \"any\").\n\n"
"Would you like to select another FTP server?",
rel, hostname)) {
variable_unset(VAR_FTP_PATH);

View file

@ -97,7 +97,7 @@ mediaCheck(Option opt)
#define TAPE_PROMPT "Please enter the tape block size in 512 byte blocks:"
#define NEWFS_PROMPT "Please enter newfs(8) parameters:"
#define RELNAME_PROMPT "Please specify the release you wish to load or\n\"none\" for a generic release install:"
#define RELNAME_PROMPT "Please specify the release you wish to load or\n\"any\" for a generic release install:"
#define BPKG_PROMPT "Please specify the name of the HTML browser package:"
#define BBIN_PROMPT "Please specify a full pathname to the HTML browser binary:"
#define EDITOR_PROMPT "Please specify the name of the text editor you wish to use:"

View file

@ -122,9 +122,10 @@ mediaInitCDROM(Device *dev)
"try again.", mountpoint);
}
else {
if (variable_cmp(VAR_RELNAME, cp)
&& variable_cmp(VAR_RELNAME, "none")
&& variable_cmp(VAR_RELNAME, "any") && !bogusCDOK) {
if (variable_cmp(VAR_RELNAME, cp) &&
variable_cmp(VAR_RELNAME, "any") &&
variable_cmp(cp, "any") &&
!bogusCDOK) {
msgConfirm("Warning: The version of the FreeBSD CD currently in the drive\n"
"(%s) does not match the version of the boot floppy\n"
"(%s).\n\n"
@ -143,10 +144,11 @@ mediaInitCDROM(Device *dev)
bogusCDOK = TRUE;
}
if ((cp = property_find(cd_attr, "CD_MACHINE_ARCH")) != NULL) {
if (strcmp(cp, "any") &&
#ifdef __alpha__
if (strcmp(cp, "alpha")) {
strcmp(cp, "alpha")) {
#else
if (strcmp(cp, "x86")) {
strcmp(cp, "x86")) {
#endif
msgConfirm("Fatal: The FreeBSD install CD currently in the drive\n"
"is for the %s architecture, not the machine you're using.\n\n"

View file

@ -149,11 +149,11 @@ mediaInitFTP(Device *dev)
/*
* Now that we've verified that the path we're given is ok, let's try to
* be a bit intelligent in locating the release we are looking for. First
* off, if the release is specified as "__RELEASE" or "none", then just
* off, if the release is specified as "__RELEASE" or "any", then just
* assume that the current directory is the one we want and give up.
*/
rel = variable_get(VAR_RELNAME);
if (strcmp(rel, "__RELEASE") && strcmp(rel, "none")) {
if (strcmp(rel, "__RELEASE") && strcmp(rel, "any")) {
/*
* Ok, since we have a release variable, let's walk through the list
* of directories looking for a release directory. The first one to
@ -182,7 +182,7 @@ mediaInitFTP(Device *dev)
"FTP server. You may need to visit a different server for\n"
"the release you are trying to fetch or go to the Options\n"
"menu and to set the release name to explicitly match what's\n"
"available on %s (or set to \"none\").\n\n"
"available on %s (or set to \"any\").\n\n"
"Would you like to select another FTP server?",
rel, hostname)) {
variable_unset(VAR_FTP_PATH);

View file

@ -97,7 +97,7 @@ mediaCheck(Option opt)
#define TAPE_PROMPT "Please enter the tape block size in 512 byte blocks:"
#define NEWFS_PROMPT "Please enter newfs(8) parameters:"
#define RELNAME_PROMPT "Please specify the release you wish to load or\n\"none\" for a generic release install:"
#define RELNAME_PROMPT "Please specify the release you wish to load or\n\"any\" for a generic release install:"
#define BPKG_PROMPT "Please specify the name of the HTML browser package:"
#define BBIN_PROMPT "Please specify a full pathname to the HTML browser binary:"
#define EDITOR_PROMPT "Please specify the name of the text editor you wish to use:"