Fix a bug with setting the soft updates option from a script.

Eliminate an old warning brought about by insufficient foresight when creating
the Menu structure.  Have I ever mentioned that sysinstall really needs to
be rewritten?
This commit is contained in:
Jordan K. Hubbard 2001-03-23 08:06:19 +00:00
parent a81186b108
commit 468255abf1
4 changed files with 8 additions and 10 deletions

View File

@ -1216,12 +1216,12 @@ diskLabelNonInteractive(Device *dev)
if (label_chunk_info[i].type == PART_SLICE) {
char name[512];
int soft, entries = 1;
int entries = 1;
while (entries) {
snprintf(name, sizeof name, "%s-%d", c1->name, entries);
if ((cp = variable_get(name)) != NULL) {
int sz;
int sz, soft = 0;
char typ[10], mpoint[50];
if (sscanf(cp, "%s %d %s %d", typ, &sz, mpoint, &soft) < 3) {
@ -1259,8 +1259,7 @@ diskLabelNonInteractive(Device *dev)
else {
tmp->private_data = new_part(mpoint, TRUE, sz);
tmp->private_free = safe_free;
if (!soft)
((PartInfo *)tmp->private_data)->soft = 1;
((PartInfo *)tmp->private_data)->soft = soft;
status = DITEM_SUCCESS;
}
}

View File

@ -1320,7 +1320,7 @@ DMenu MenuNetworking = {
{ " NFS server", "This machine will be an NFS server",
dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable=YES" },
{ " Ntpdate", "Select a clock-synchronization server",
dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', "ntpdate_enable=YES" },
dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (int)"ntpdate_enable=YES" },
{ " PCNFSD", "Run authentication server for clients with PC-NFS.",
dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" },
{ " portmap", "This machine wants to run the portmapper daemon",

View File

@ -1216,12 +1216,12 @@ diskLabelNonInteractive(Device *dev)
if (label_chunk_info[i].type == PART_SLICE) {
char name[512];
int soft, entries = 1;
int entries = 1;
while (entries) {
snprintf(name, sizeof name, "%s-%d", c1->name, entries);
if ((cp = variable_get(name)) != NULL) {
int sz;
int sz, soft = 0;
char typ[10], mpoint[50];
if (sscanf(cp, "%s %d %s %d", typ, &sz, mpoint, &soft) < 3) {
@ -1259,8 +1259,7 @@ diskLabelNonInteractive(Device *dev)
else {
tmp->private_data = new_part(mpoint, TRUE, sz);
tmp->private_free = safe_free;
if (!soft)
((PartInfo *)tmp->private_data)->soft = 1;
((PartInfo *)tmp->private_data)->soft = soft;
status = DITEM_SUCCESS;
}
}

View File

@ -1320,7 +1320,7 @@ DMenu MenuNetworking = {
{ " NFS server", "This machine will be an NFS server",
dmenuVarCheck, configNFSServer, NULL, "nfs_server_enable=YES" },
{ " Ntpdate", "Select a clock-synchronization server",
dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', "ntpdate_enable=YES" },
dmenuVarCheck, dmenuSubmenu, NULL, &MenuNTP, '[', 'X', ']', (int)"ntpdate_enable=YES" },
{ " PCNFSD", "Run authentication server for clients with PC-NFS.",
dmenuVarCheck, configPCNFSD, NULL, "pcnfsd" },
{ " portmap", "This machine wants to run the portmapper daemon",