Deleted Added
full compact
config.c (17189) config.c (17404)
1/*
2 * The new sysinstall program.
3 *
4 * This is probably the last program in the `sysinstall' line - the next
5 * generation being essentially a complete rewrite.
6 *
1/*
2 * The new sysinstall program.
3 *
4 * This is probably the last program in the `sysinstall' line - the next
5 * generation being essentially a complete rewrite.
6 *
7 * $Id: config.c,v 1.45 1996/07/08 08:54:23 jkh Exp $
7 * $Id: config.c,v 1.46 1996/07/16 17:11:39 jkh Exp $
8 *
9 * Copyright (c) 1995
10 * Jordan Hubbard. All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright

--- 427 unchanged lines hidden (view full) ---

443
444 if (!mediaDevice->init(mediaDevice))
445 return DITEM_FAILURE;
446
447 if (!index_initted) {
448 msgNotify("Attempting to fetch packages/INDEX file from selected media.");
449 fd = mediaDevice->get(mediaDevice, "packages/INDEX", TRUE);
450 if (fd < 0) {
8 *
9 * Copyright (c) 1995
10 * Jordan Hubbard. All rights reserved.
11 *
12 * Redistribution and use in source and binary forms, with or without
13 * modification, are permitted provided that the following conditions
14 * are met:
15 * 1. Redistributions of source code must retain the above copyright

--- 427 unchanged lines hidden (view full) ---

443
444 if (!mediaDevice->init(mediaDevice))
445 return DITEM_FAILURE;
446
447 if (!index_initted) {
448 msgNotify("Attempting to fetch packages/INDEX file from selected media.");
449 fd = mediaDevice->get(mediaDevice, "packages/INDEX", TRUE);
450 if (fd < 0) {
451 dialog_clear();
451 dialog_clear_norefresh();
452 msgConfirm("Unable to get packages/INDEX file from selected media.\n"
453 "This may be because the packages collection is not available at\n"
454 "on the distribution media you've chosen (most likely an FTP site\n"
455 "without the packages collection mirrored). Please verify media\n"
456 "(or path to media) and try again. If your local site does not\n"
457 "carry the packages collection, then we recommend either a CD\n"
458 "distribution or the master distribution on ftp.freebsd.org.");
459 return DITEM_FAILURE;

--- 24 unchanged lines hidden (view full) ---

484 if (ret & DITEM_LEAVE_MENU)
485 break;
486 else if (DITEM_STATUS(ret) != DITEM_FAILURE) {
487 index_extract(mediaDevice, &top, &plist);
488 break;
489 }
490 }
491 else {
452 msgConfirm("Unable to get packages/INDEX file from selected media.\n"
453 "This may be because the packages collection is not available at\n"
454 "on the distribution media you've chosen (most likely an FTP site\n"
455 "without the packages collection mirrored). Please verify media\n"
456 "(or path to media) and try again. If your local site does not\n"
457 "carry the packages collection, then we recommend either a CD\n"
458 "distribution or the master distribution on ftp.freebsd.org.");
459 return DITEM_FAILURE;

--- 24 unchanged lines hidden (view full) ---

484 if (ret & DITEM_LEAVE_MENU)
485 break;
486 else if (DITEM_STATUS(ret) != DITEM_FAILURE) {
487 index_extract(mediaDevice, &top, &plist);
488 break;
489 }
490 }
491 else {
492 dialog_clear();
492 dialog_clear_norefresh();
493 msgConfirm("No packages were selected for extraction.");
494 break;
495 }
496 }
497 tmp = plist.kids;
498 while (tmp) {
499 PkgNodePtr tmp2 = tmp->next;
500

--- 5 unchanged lines hidden (view full) ---

506}
507
508int
509configPorts(dialogMenuItem *self)
510{
511 char *cp, *dist = NULL; /* Shut up compiler */
512 int status = DITEM_SUCCESS, tries = 0;
513
493 msgConfirm("No packages were selected for extraction.");
494 break;
495 }
496 }
497 tmp = plist.kids;
498 while (tmp) {
499 PkgNodePtr tmp2 = tmp->next;
500

--- 5 unchanged lines hidden (view full) ---

506}
507
508int
509configPorts(dialogMenuItem *self)
510{
511 char *cp, *dist = NULL; /* Shut up compiler */
512 int status = DITEM_SUCCESS, tries = 0;
513
514 dialog_clear();
514 dialog_clear_norefresh();
515 if (!variable_get(VAR_PORTS_PATH))
516 variable_set2(VAR_PORTS_PATH, dist = "/cdrom/ports");
515 if (!variable_get(VAR_PORTS_PATH))
516 variable_set2(VAR_PORTS_PATH, dist = "/cdrom/ports");
517 dialog_clear();
517 dialog_clear_norefresh();
518 while (!directory_exists(dist)) {
519 if (++tries > 2) {
520 msgConfirm("You appear to be having some problems with your CD drive\n"
521 "or perhaps cannot find the second CD. This step will now\n"
522 "therefore be skipped.");
523 status = DITEM_FAILURE;
524 goto fixup;
525 }

--- 160 unchanged lines hidden ---
518 while (!directory_exists(dist)) {
519 if (++tries > 2) {
520 msgConfirm("You appear to be having some problems with your CD drive\n"
521 "or perhaps cannot find the second CD. This step will now\n"
522 "therefore be skipped.");
523 status = DITEM_FAILURE;
524 goto fixup;
525 }

--- 160 unchanged lines hidden ---