1. Add a noWarn flag so that scripts can turn warnings off.

2. If hostname not set from script, bring up interactive dialog anyway.
This commit is contained in:
Jordan K. Hubbard 1997-06-18 05:11:37 +00:00
parent e1eecc081e
commit 2233edf577
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=26717
13 changed files with 43 additions and 21 deletions

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: disks.c,v 1.86 1997/06/05 09:47:55 jkh Exp $
* $Id: disks.c,v 1.87 1997/06/12 08:46:50 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -256,7 +256,7 @@ diskPartition(Device *dev, Disk *d)
rv = msgYesNo("Do you want to do this with a true partition entry\n"
"so as to remain cooperative with any future possible\n"
"operating systems on the drive(s)?");
if (rv != 0 && (!cp || strcasecmp(cp, "nowarn"))) {
if (rv != 0 && (!cp || strcasecmp(cp, "nowarn")) && !variable_get(VAR_NO_WARN)) {
rv = !msgYesNo("This is dangerous in that it will make the drive totally\n"
"uncooperative with other potential operating systems on the\n"
"same disk. It will lead instead to a totally dedicated disk,\n"
@ -455,7 +455,8 @@ diskPartition(Device *dev, Disk *d)
dialog_clear_norefresh();
use_helpline("Press F1 to read more about disk slices.");
use_helpfile(systemHelpFile("partition", buf));
dialog_mesgbox("Disk slicing warning:", p, -1, -1);
if (!variable_get(VAR_NO_WARN))
dialog_mesgbox("Disk slicing warning:", p, -1, -1);
free(p);
}
restorescr(w);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: install.c,v 1.187 1997/05/30 01:03:09 jkh Exp $
* $Id: install.c,v 1.188 1997/06/13 07:11:54 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -70,6 +70,10 @@ checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vd
Chunk *c1, *c2, *rootdev, *swapdev, *usrdev, *vardev;
int i;
/* Don't allow whinging if noWarn is set */
if (variable_get(VAR_NO_WARN))
whinge = FALSE;
status = TRUE;
*rdev = *sdev = *udev = *vdev = rootdev = swapdev = usrdev = vardev = NULL;

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
* $Id: options.c,v 1.53 1997/02/07 04:26:46 jkh Exp $
* $Id: options.c,v 1.54 1997/05/22 00:17:11 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -112,6 +112,8 @@ static Option Options[] = {
OPT_IS_VAR, NULL, VAR_SLOW_ETHER, varCheck },
{ "Debugging", "Emit extra debugging output on VTY2 (ALT-F2)",
OPT_IS_VAR, NULL, VAR_DEBUG, varCheck },
{ "No Warnings", "Don't Warn the user when a setting seems incorrect",
OPT_IS_VAR, NULL, VAR_NO_WARN, varCheck },
{ "Yes to All", "Assume \"Yes\" answers to all non-critical dialogs",
OPT_IS_VAR, NULL, VAR_NO_CONFIRM, varCheck },
{ "FTP username", "Username and password to use instead of anonymous",

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.133 1997/06/13 14:21:21 jkh Exp $
* $Id: sysinstall.h,v 1.134 1997/06/13 17:55:32 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -135,6 +135,7 @@
#define VAR_NFS_SECURE "nfsSecure"
#define VAR_NFS_SERVER "nfs_server_enable"
#define VAR_NO_CONFIRM "noConfirm"
#define VAR_NO_WARN "noWarn"
#define VAR_NONINTERACTIVE "nonInteractive"
#define VAR_NOVELL "novell"
#define VAR_PARTITION "partition"

View File

@ -1,5 +1,5 @@
/*
* $Id: tcpip.c,v 1.67 1997/06/12 07:35:40 jkh Exp $
* $Id: tcpip.c,v 1.68 1997/06/12 09:01:38 jkh Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@ -215,7 +215,7 @@ tcpOpenDialog(Device *devp)
save = savescr();
/* If non-interactive, jump straight over the dialog crap and into config section */
if (variable_get(VAR_NONINTERACTIVE))
if (variable_get(VAR_NONINTERACTIVE) && hostname[0])
goto netconfig;
/* Now do all the screen I/O */

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: disks.c,v 1.86 1997/06/05 09:47:55 jkh Exp $
* $Id: disks.c,v 1.87 1997/06/12 08:46:50 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -256,7 +256,7 @@ diskPartition(Device *dev, Disk *d)
rv = msgYesNo("Do you want to do this with a true partition entry\n"
"so as to remain cooperative with any future possible\n"
"operating systems on the drive(s)?");
if (rv != 0 && (!cp || strcasecmp(cp, "nowarn"))) {
if (rv != 0 && (!cp || strcasecmp(cp, "nowarn")) && !variable_get(VAR_NO_WARN)) {
rv = !msgYesNo("This is dangerous in that it will make the drive totally\n"
"uncooperative with other potential operating systems on the\n"
"same disk. It will lead instead to a totally dedicated disk,\n"
@ -455,7 +455,8 @@ diskPartition(Device *dev, Disk *d)
dialog_clear_norefresh();
use_helpline("Press F1 to read more about disk slices.");
use_helpfile(systemHelpFile("partition", buf));
dialog_mesgbox("Disk slicing warning:", p, -1, -1);
if (!variable_get(VAR_NO_WARN))
dialog_mesgbox("Disk slicing warning:", p, -1, -1);
free(p);
}
restorescr(w);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: install.c,v 1.187 1997/05/30 01:03:09 jkh Exp $
* $Id: install.c,v 1.188 1997/06/13 07:11:54 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -70,6 +70,10 @@ checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vd
Chunk *c1, *c2, *rootdev, *swapdev, *usrdev, *vardev;
int i;
/* Don't allow whinging if noWarn is set */
if (variable_get(VAR_NO_WARN))
whinge = FALSE;
status = TRUE;
*rdev = *sdev = *udev = *vdev = rootdev = swapdev = usrdev = vardev = NULL;

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.133 1997/06/13 14:21:21 jkh Exp $
* $Id: sysinstall.h,v 1.134 1997/06/13 17:55:32 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -135,6 +135,7 @@
#define VAR_NFS_SECURE "nfsSecure"
#define VAR_NFS_SERVER "nfs_server_enable"
#define VAR_NO_CONFIRM "noConfirm"
#define VAR_NO_WARN "noWarn"
#define VAR_NONINTERACTIVE "nonInteractive"
#define VAR_NOVELL "novell"
#define VAR_PARTITION "partition"

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: disks.c,v 1.86 1997/06/05 09:47:55 jkh Exp $
* $Id: disks.c,v 1.87 1997/06/12 08:46:50 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -256,7 +256,7 @@ diskPartition(Device *dev, Disk *d)
rv = msgYesNo("Do you want to do this with a true partition entry\n"
"so as to remain cooperative with any future possible\n"
"operating systems on the drive(s)?");
if (rv != 0 && (!cp || strcasecmp(cp, "nowarn"))) {
if (rv != 0 && (!cp || strcasecmp(cp, "nowarn")) && !variable_get(VAR_NO_WARN)) {
rv = !msgYesNo("This is dangerous in that it will make the drive totally\n"
"uncooperative with other potential operating systems on the\n"
"same disk. It will lead instead to a totally dedicated disk,\n"
@ -455,7 +455,8 @@ diskPartition(Device *dev, Disk *d)
dialog_clear_norefresh();
use_helpline("Press F1 to read more about disk slices.");
use_helpfile(systemHelpFile("partition", buf));
dialog_mesgbox("Disk slicing warning:", p, -1, -1);
if (!variable_get(VAR_NO_WARN))
dialog_mesgbox("Disk slicing warning:", p, -1, -1);
free(p);
}
restorescr(w);

View File

@ -4,7 +4,7 @@
* This is probably the last program in the `sysinstall' line - the next
* generation being essentially a complete rewrite.
*
* $Id: install.c,v 1.187 1997/05/30 01:03:09 jkh Exp $
* $Id: install.c,v 1.188 1997/06/13 07:11:54 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -70,6 +70,10 @@ checkLabels(Boolean whinge, Chunk **rdev, Chunk **sdev, Chunk **udev, Chunk **vd
Chunk *c1, *c2, *rootdev, *swapdev, *usrdev, *vardev;
int i;
/* Don't allow whinging if noWarn is set */
if (variable_get(VAR_NO_WARN))
whinge = FALSE;
status = TRUE;
*rdev = *sdev = *udev = *vdev = rootdev = swapdev = usrdev = vardev = NULL;

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated for what's essentially a complete rewrite.
*
* $Id: options.c,v 1.53 1997/02/07 04:26:46 jkh Exp $
* $Id: options.c,v 1.54 1997/05/22 00:17:11 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -112,6 +112,8 @@ static Option Options[] = {
OPT_IS_VAR, NULL, VAR_SLOW_ETHER, varCheck },
{ "Debugging", "Emit extra debugging output on VTY2 (ALT-F2)",
OPT_IS_VAR, NULL, VAR_DEBUG, varCheck },
{ "No Warnings", "Don't Warn the user when a setting seems incorrect",
OPT_IS_VAR, NULL, VAR_NO_WARN, varCheck },
{ "Yes to All", "Assume \"Yes\" answers to all non-critical dialogs",
OPT_IS_VAR, NULL, VAR_NO_CONFIRM, varCheck },
{ "FTP username", "Username and password to use instead of anonymous",

View File

@ -4,7 +4,7 @@
* This is probably the last attempt in the `sysinstall' line, the next
* generation being slated to essentially a complete rewrite.
*
* $Id: sysinstall.h,v 1.133 1997/06/13 14:21:21 jkh Exp $
* $Id: sysinstall.h,v 1.134 1997/06/13 17:55:32 jkh Exp $
*
* Copyright (c) 1995
* Jordan Hubbard. All rights reserved.
@ -135,6 +135,7 @@
#define VAR_NFS_SECURE "nfsSecure"
#define VAR_NFS_SERVER "nfs_server_enable"
#define VAR_NO_CONFIRM "noConfirm"
#define VAR_NO_WARN "noWarn"
#define VAR_NONINTERACTIVE "nonInteractive"
#define VAR_NOVELL "novell"
#define VAR_PARTITION "partition"

View File

@ -1,5 +1,5 @@
/*
* $Id: tcpip.c,v 1.67 1997/06/12 07:35:40 jkh Exp $
* $Id: tcpip.c,v 1.68 1997/06/12 09:01:38 jkh Exp $
*
* Copyright (c) 1995
* Gary J Palmer. All rights reserved.
@ -215,7 +215,7 @@ tcpOpenDialog(Device *devp)
save = savescr();
/* If non-interactive, jump straight over the dialog crap and into config section */
if (variable_get(VAR_NONINTERACTIVE))
if (variable_get(VAR_NONINTERACTIVE) && hostname[0])
goto netconfig;
/* Now do all the screen I/O */