When we did not magically find any CD medium with sets, offer a manual override (so ISO images on USB sticks or Xen's xbd(4) work).diff -r1.22 -r1.23 src/usr.sbin/sysinst/menus.mi
(martin)
--- src/usr.sbin/sysinst/menus.mi 2020/10/24 16:13:15 1.22
+++ src/usr.sbin/sysinst/menus.mi 2020/10/27 15:28:01 1.23
--- src/usr.sbin/sysinst/msg.mi.de 2020/10/24 16:13:15 1.25
+++ src/usr.sbin/sysinst/msg.mi.de 2020/10/27 15:28:01 1.26
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: msg.mi.de,v 1.25 2020/10/24 16:13:15 martin Exp $ */ | 1 | /* $NetBSD: msg.mi.de,v 1.26 2020/10/27 15:28:01 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 1997 Piermont Information Systems Inc. | 4 | * Copyright 1997 Piermont Information Systems Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | 7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -541,27 +541,36 @@ Verzeichnis der Diskette liegen. | @@ -541,27 +541,36 @@ Verzeichnis der Diskette liegen. | |||
541 | } | 541 | } | |
542 | 542 | |||
543 | /* Called with: Example | 543 | /* Called with: Example | |
544 | * $0 = sets suffix .tgz | 544 | * $0 = sets suffix .tgz | |
545 | */ | 545 | */ | |
546 | message cdromsource | 546 | message cdromsource | |
547 | {Geben Sie das CD-Laufwerk und das entsprechende Verzeichnis an, in dem | 547 | {Geben Sie das CD-Laufwerk und das entsprechende Verzeichnis an, in dem | |
548 | die Distribution zu finden ist. | 548 | die Distribution zu finden ist. | |
549 | (Das Verzeichnis muss $0 Dateien enthalten.) | 549 | (Das Verzeichnis muss $0 Dateien enthalten.) | |
550 | 550 | |||
551 | } | 551 | } | |
552 | 552 | |||
553 | message No_cd_found | 553 | message No_cd_found | |
554 | {Kein CD Laufwerk enthält eine CD mit den Distributions-Dateien!} | 554 | {Kein CD Laufwerk enthält eine CD mit den Distributions-Dateien! | |
555 | Geben Sie die korrekten Daten manuel ein, oder legen Sie eine CD | |||
556 | ein und versuchen Sie es erneut. | |||
557 | } | |||
558 | ||||
559 | message abort_install | |||
560 | {Installation abbrechen} | |||
561 | ||||
562 | message source_sel_retry | |||
563 | {Zurück zur Quellauswahl} | |||
555 | 564 | |||
556 | message Available_cds | 565 | message Available_cds | |
557 | {Verfügbare CDs} | 566 | {Verfügbare CDs} | |
558 | 567 | |||
559 | message ask_cd | 568 | message ask_cd | |
560 | {Es wurden mehrere CDs gefunden. Bitte wählen Sie die Installations CD aus.} | 569 | {Es wurden mehrere CDs gefunden. Bitte wählen Sie die Installations CD aus.} | |
561 | 570 | |||
562 | message cd_path_not_found | 571 | message cd_path_not_found | |
563 | {Die Installationsdateien wurden auf der ausgewählten CD nicht gefunden. Bitte | 572 | {Die Installationsdateien wurden auf der ausgewählten CD nicht gefunden. Bitte | |
564 | prüfen Sie den Gerätenamen und Pfad der Installationsdateien.} | 573 | prüfen Sie den Gerätenamen und Pfad der Installationsdateien.} | |
565 | 574 | |||
566 | /* Called with: Example | 575 | /* Called with: Example | |
567 | * $0 = sets suffix .tgz | 576 | * $0 = sets suffix .tgz |
--- src/usr.sbin/sysinst/msg.mi.en 2020/10/24 16:13:15 1.33
+++ src/usr.sbin/sysinst/msg.mi.en 2020/10/27 15:28:01 1.34
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: msg.mi.en,v 1.33 2020/10/24 16:13:15 martin Exp $ */ | 1 | /* $NetBSD: msg.mi.en,v 1.34 2020/10/27 15:28:01 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 1997 Piermont Information Systems Inc. | 4 | * Copyright 1997 Piermont Information Systems Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | 7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -520,28 +520,35 @@ file system. The set files must be in t | @@ -520,28 +520,35 @@ file system. The set files must be in t | |||
520 | } | 520 | } | |
521 | 521 | |||
522 | /* Called with: Example | 522 | /* Called with: Example | |
523 | * $0 = sets suffix .tgz | 523 | * $0 = sets suffix .tgz | |
524 | */ | 524 | */ | |
525 | message cdromsource | 525 | message cdromsource | |
526 | {Enter the CDROM device to be used and directory on the CDROM where | 526 | {Enter the CDROM device to be used and directory on the CDROM where | |
527 | the distribution is located. | 527 | the distribution is located. | |
528 | Remember, the directory should contain the $0 files. | 528 | Remember, the directory should contain the $0 files. | |
529 | 529 | |||
530 | } | 530 | } | |
531 | 531 | |||
532 | message No_cd_found | 532 | message No_cd_found | |
533 | {Could not locate a CD medium in any drive with the distribution sets. | 533 | {Could not locate a CD medium in any drive with the distribution sets! | |
534 | Check the proper medium and retry!} | 534 | Enter the correct data manually, or insert a disk and retry. | |
535 | } | |||
536 | ||||
537 | message abort_install | |||
538 | {Cancel installation} | |||
539 | ||||
540 | message source_sel_retry | |||
541 | {Back to source selection & retry} | |||
535 | 542 | |||
536 | message Available_cds | 543 | message Available_cds | |
537 | {Available CDs } | 544 | {Available CDs } | |
538 | 545 | |||
539 | message ask_cd | 546 | message ask_cd | |
540 | {Multiple CDs found. Please select the one containing the install CD.} | 547 | {Multiple CDs found. Please select the one containing the install CD.} | |
541 | 548 | |||
542 | message cd_path_not_found | 549 | message cd_path_not_found | |
543 | {The installation sets have not been found at the default location on this | 550 | {The installation sets have not been found at the default location on this | |
544 | CD. Please check the device and path name.} | 551 | CD. Please check the device and path name.} | |
545 | 552 | |||
546 | /* Called with: Example | 553 | /* Called with: Example | |
547 | * $0 = sets suffix .tgz | 554 | * $0 = sets suffix .tgz |
--- src/usr.sbin/sysinst/msg.mi.pl 2020/10/24 16:13:15 1.33
+++ src/usr.sbin/sysinst/msg.mi.pl 2020/10/27 15:28:01 1.34
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: msg.mi.pl,v 1.33 2020/10/24 16:13:15 martin Exp $ */ | 1 | /* $NetBSD: msg.mi.pl,v 1.34 2020/10/27 15:28:01 martin Exp $ */ | |
2 | /* Based on english version: */ | 2 | /* Based on english version: */ | |
3 | /* NetBSD: msg.mi.pl,v 1.36 2004/04/17 18:55:35 atatat Exp */ | 3 | /* NetBSD: msg.mi.pl,v 1.36 2004/04/17 18:55:35 atatat Exp */ | |
4 | 4 | |||
5 | /* | 5 | /* | |
6 | * Copyright 1997 Piermont Information Systems Inc. | 6 | * Copyright 1997 Piermont Information Systems Inc. | |
7 | * All rights reserved. | 7 | * All rights reserved. | |
8 | * | 8 | * | |
9 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | 9 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | |
10 | * | 10 | * | |
11 | * Redistribution and use in source and binary forms, with or without | 11 | * Redistribution and use in source and binary forms, with or without | |
12 | * modification, are permitted provided that the following conditions | 12 | * modification, are permitted provided that the following conditions | |
13 | * are met: | 13 | * are met: | |
14 | * 1. Redistributions of source code must retain the above copyright | 14 | * 1. Redistributions of source code must retain the above copyright | |
@@ -514,28 +514,35 @@ znajdowac sie w glownym katalogu dyskiet | @@ -514,28 +514,35 @@ znajdowac sie w glownym katalogu dyskiet | |||
514 | } | 514 | } | |
515 | 515 | |||
516 | /* Called with: Example | 516 | /* Called with: Example | |
517 | * $0 = sets suffix .tgz | 517 | * $0 = sets suffix .tgz | |
518 | */ | 518 | */ | |
519 | message cdromsource | 519 | message cdromsource | |
520 | {Podaj urzadzenie CDROM oraz katalog na CDROMie, w ktorym znajduje sie | 520 | {Podaj urzadzenie CDROM oraz katalog na CDROMie, w ktorym znajduje sie | |
521 | dystrybucja. | 521 | dystrybucja. | |
522 | Pamietaj, ze katalog musi zawierac pliki $0. | 522 | Pamietaj, ze katalog musi zawierac pliki $0. | |
523 | 523 | |||
524 | } | 524 | } | |
525 | 525 | |||
526 | message No_cd_found | 526 | message No_cd_found | |
527 | {Could not locate a CD medium in any drive with the distribution sets. | 527 | {Could not locate a CD medium in any drive with the distribution sets! | |
528 | Check the proper medium and retry!} | 528 | Enter the correct data manually, or insert a disk and retry. | |
529 | } | |||
530 | ||||
531 | message abort_install | |||
532 | {Cancel installation} | |||
533 | ||||
534 | message source_sel_retry | |||
535 | {Back to source selection & retry} | |||
529 | 536 | |||
530 | message Available_cds | 537 | message Available_cds | |
531 | {Dostepne napedy CD} | 538 | {Dostepne napedy CD} | |
532 | 539 | |||
533 | message ask_cd | 540 | message ask_cd | |
534 | {Znaleziono kilka napedow CD, prosze wybrac ten, ktory zawiera | 541 | {Znaleziono kilka napedow CD, prosze wybrac ten, ktory zawiera | |
535 | nosnik instalacyjny.} | 542 | nosnik instalacyjny.} | |
536 | 543 | |||
537 | message cd_path_not_found | 544 | message cd_path_not_found | |
538 | {Zbiory instalacyjne nie zostaly znalezione w domyslnym polozeniu na tym | 545 | {Zbiory instalacyjne nie zostaly znalezione w domyslnym polozeniu na tym | |
539 | CD. Prosze sprawdzic urzadzenie i sciezke.} | 546 | CD. Prosze sprawdzic urzadzenie i sciezke.} | |
540 | 547 | |||
541 | /* Called with: Example | 548 | /* Called with: Example |
--- src/usr.sbin/sysinst/msg.mi.es 2020/10/24 16:13:15 1.27
+++ src/usr.sbin/sysinst/msg.mi.es 2020/10/27 15:28:01 1.28
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: msg.mi.es,v 1.27 2020/10/24 16:13:15 martin Exp $ */ | 1 | /* $NetBSD: msg.mi.es,v 1.28 2020/10/27 15:28:01 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 1997 Piermont Information Systems Inc. | 4 | * Copyright 1997 Piermont Information Systems Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | 7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -536,28 +536,35 @@ en el directorio raíz de los disquetes. | @@ -536,28 +536,35 @@ en el directorio raíz de los disquetes. | |||
536 | } | 536 | } | |
537 | 537 | |||
538 | /* Called with: Example | 538 | /* Called with: Example | |
539 | * $0 = sets suffix .tgz | 539 | * $0 = sets suffix .tgz | |
540 | */ | 540 | */ | |
541 | message cdromsource | 541 | message cdromsource | |
542 | {Introduzca el dispositivo de CDROM a usar y el directorio del CDROM | 542 | {Introduzca el dispositivo de CDROM a usar y el directorio del CDROM | |
543 | donde se encuentre la distribución. | 543 | donde se encuentre la distribución. | |
544 | Recuerde, el directorio debe contener los archivos $0. | 544 | Recuerde, el directorio debe contener los archivos $0. | |
545 | 545 | |||
546 | } | 546 | } | |
547 | 547 | |||
548 | message No_cd_found | 548 | message No_cd_found | |
549 | {Could not locate a CD medium in any drive with the distribution sets. | 549 | {Could not locate a CD medium in any drive with the distribution sets! | |
550 | Check the proper medium and retry!} | 550 | Enter the correct data manually, or insert a disk and retry. | |
551 | } | |||
552 | ||||
553 | message abort_install | |||
554 | {Cancel installation} | |||
555 | ||||
556 | message source_sel_retry | |||
557 | {Back to source selection & retry} | |||
551 | 558 | |||
552 | message Available_cds | 559 | message Available_cds | |
553 | {Available CDs} | 560 | {Available CDs} | |
554 | 561 | |||
555 | message ask_cd | 562 | message ask_cd | |
556 | {Multiple CDs found, please select the one containing the install CD.} | 563 | {Multiple CDs found, please select the one containing the install CD.} | |
557 | 564 | |||
558 | message cd_path_not_found | 565 | message cd_path_not_found | |
559 | {The installation sets have not been found at the default location on this | 566 | {The installation sets have not been found at the default location on this | |
560 | CD. Please check device and path name.} | 567 | CD. Please check device and path name.} | |
561 | 568 | |||
562 | /* Called with: Example | 569 | /* Called with: Example | |
563 | * $0 = sets suffix .tgz | 570 | * $0 = sets suffix .tgz |
--- src/usr.sbin/sysinst/msg.mi.fr 2020/10/24 16:13:15 1.32
+++ src/usr.sbin/sysinst/msg.mi.fr 2020/10/27 15:28:01 1.33
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: msg.mi.fr,v 1.32 2020/10/24 16:13:15 martin Exp $ */ | 1 | /* $NetBSD: msg.mi.fr,v 1.33 2020/10/27 15:28:01 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 1997 Piermont Information Systems Inc. | 4 | * Copyright 1997 Piermont Information Systems Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | 7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -532,28 +532,35 @@ Les fichiers d'installation devront se t | @@ -532,28 +532,35 @@ Les fichiers d'installation devront se t | |||
532 | de chaque disquette. | 532 | de chaque disquette. | |
533 | 533 | |||
534 | } | 534 | } | |
535 | 535 | |||
536 | message cdromsource | 536 | message cdromsource | |
537 | {Veuillez spécifier le nom du lecteur CD-ROM à utiliser, | 537 | {Veuillez spécifier le nom du lecteur CD-ROM à utiliser, | |
538 | ainsi que le nom du répertoire contenant les fichiers d'installation. | 538 | ainsi que le nom du répertoire contenant les fichiers d'installation. | |
539 | Ils doivent être placés à sa racine, sous la forme de fichiers | 539 | Ils doivent être placés à sa racine, sous la forme de fichiers | |
540 | tgz. | 540 | tgz. | |
541 | 541 | |||
542 | } | 542 | } | |
543 | 543 | |||
544 | message No_cd_found | 544 | message No_cd_found | |
545 | {Could not locate a CD medium in any drive with the distribution sets. | 545 | {Could not locate a CD medium in any drive with the distribution sets! | |
546 | Check the proper medium and retry!} | 546 | Enter the correct data manually, or insert a disk and retry. | |
547 | } | |||
548 | ||||
549 | message abort_install | |||
550 | {Cancel installation} | |||
551 | ||||
552 | message source_sel_retry | |||
553 | {Back to source selection & retry} | |||
547 | 554 | |||
548 | message Available_cds | 555 | message Available_cds | |
549 | {CD-ROM disponibles} | 556 | {CD-ROM disponibles} | |
550 | 557 | |||
551 | message ask_cd | 558 | message ask_cd | |
552 | {Plusieurs CD-ROM ont été trouvés. Sélectionnez celui contenant le système | 559 | {Plusieurs CD-ROM ont été trouvés. Sélectionnez celui contenant le système | |
553 | d'installation de NetBSD.} | 560 | d'installation de NetBSD.} | |
554 | 561 | |||
555 | message cd_path_not_found | 562 | message cd_path_not_found | |
556 | {Les archives d'installation ne peuvent être trouvées à l'emplacement spécifié | 563 | {Les archives d'installation ne peuvent être trouvées à l'emplacement spécifié | |
557 | sur ce CD-ROM. Assurez-vous que le périphérique et le chemin sont les bons.} | 564 | sur ce CD-ROM. Assurez-vous que le périphérique et le chemin sont les bons.} | |
558 | 565 | |||
559 | message localfssource | 566 | message localfssource |
--- src/usr.sbin/sysinst/util.c 2020/10/26 20:18:33 1.51
+++ src/usr.sbin/sysinst/util.c 2020/10/27 15:28:01 1.52
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: util.c,v 1.51 2020/10/26 20:18:33 martin Exp $ */ | 1 | /* $NetBSD: util.c,v 1.52 2020/10/27 15:28:01 martin Exp $ */ | |
2 | 2 | |||
3 | /* | 3 | /* | |
4 | * Copyright 1997 Piermont Information Systems Inc. | 4 | * Copyright 1997 Piermont Information Systems Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | 7 | * Written by Philip A. Nelson for Piermont Information Systems Inc. | |
8 | * | 8 | * | |
9 | * Redistribution and use in source and binary forms, with or without | 9 | * Redistribution and use in source and binary forms, with or without | |
10 | * modification, are permitted provided that the following conditions | 10 | * modification, are permitted provided that the following conditions | |
11 | * are met: | 11 | * are met: | |
12 | * 1. Redistributions of source code must retain the above copyright | 12 | * 1. Redistributions of source code must retain the above copyright | |
13 | * notice, this list of conditions and the following disclaimer. | 13 | * notice, this list of conditions and the following disclaimer. | |
14 | * 2. Redistributions in binary form must reproduce the above copyright | 14 | * 2. Redistributions in binary form must reproduce the above copyright | |
@@ -529,26 +529,31 @@ get_available_cds(void) | @@ -529,26 +529,31 @@ get_available_cds(void) | |||
529 | data.num_mounted = m; | 529 | data.num_mounted = m; | |
530 | } | 530 | } | |
531 | 531 | |||
532 | enumerate_disks(&data, get_available_cds_helper); | 532 | enumerate_disks(&data, get_available_cds_helper); | |
533 | 533 | |||
534 | free(data.mounted); | 534 | free(data.mounted); | |
535 | 535 | |||
536 | return data.count; | 536 | return data.count; | |
537 | } | 537 | } | |
538 | 538 | |||
539 | static int | 539 | static int | |
540 | cd_has_sets(void) | 540 | cd_has_sets(void) | |
541 | { | 541 | { | |
542 | ||||
543 | /* sanity check */ | |||
544 | if (cdrom_dev[0] == 0) | |||
545 | return 0; | |||
546 | ||||
542 | /* Mount it */ | 547 | /* Mount it */ | |
543 | if (run_program(RUN_SILENT, "/sbin/mount -rt cd9660 /dev/%s /mnt2", | 548 | if (run_program(RUN_SILENT, "/sbin/mount -rt cd9660 /dev/%s /mnt2", | |
544 | cdrom_dev) != 0) | 549 | cdrom_dev) != 0) | |
545 | return 0; | 550 | return 0; | |
546 | 551 | |||
547 | mnt2_mounted = 1; | 552 | mnt2_mounted = 1; | |
548 | 553 | |||
549 | snprintf(ext_dir_bin, sizeof ext_dir_bin, "%s/%s", "/mnt2", set_dir_bin); | 554 | snprintf(ext_dir_bin, sizeof ext_dir_bin, "%s/%s", "/mnt2", set_dir_bin); | |
550 | snprintf(ext_dir_src, sizeof ext_dir_src, "%s/%s", "/mnt2", set_dir_src); | 555 | snprintf(ext_dir_src, sizeof ext_dir_src, "%s/%s", "/mnt2", set_dir_src); | |
551 | return dir_exists_p(ext_dir_bin); | 556 | return dir_exists_p(ext_dir_bin); | |
552 | } | 557 | } | |
553 | 558 | |||
554 | /* | 559 | /* | |
@@ -586,86 +591,83 @@ root_is_read_only(void) | @@ -586,86 +591,83 @@ root_is_read_only(void) | |||
586 | } | 591 | } | |
587 | 592 | |||
588 | /* | 593 | /* | |
589 | * Get from a CDROM distribution. | 594 | * Get from a CDROM distribution. | |
590 | * Also used on "installation using bootable install media" | 595 | * Also used on "installation using bootable install media" | |
591 | * as the default option in the "distmedium" menu. | 596 | * as the default option in the "distmedium" menu. | |
592 | */ | 597 | */ | |
593 | int | 598 | int | |
594 | get_via_cdrom(void) | 599 | get_via_cdrom(void) | |
595 | { | 600 | { | |
596 | menu_ent cd_menu[MAX_CD_INFOS]; | 601 | menu_ent cd_menu[MAX_CD_INFOS]; | |
597 | struct stat sb; | 602 | struct stat sb; | |
598 | int rv, num_cds, menu_cd, i, selected_cd = 0; | 603 | int rv, num_cds, menu_cd, i, selected_cd = 0; | |
599 | bool silent = false; | |||
600 | int mib[2]; | 604 | int mib[2]; | |
601 | char rootdev[SSTRSIZE] = ""; | 605 | char rootdev[SSTRSIZE] = ""; | |
602 | size_t varlen; | 606 | size_t varlen; | |
603 | 607 | |||
604 | /* If root is not md(4) and we have set dir, skip this step. */ | 608 | /* If root is not md(4) and we have set dir, skip this step. */ | |
605 | mib[0] = CTL_KERN; | 609 | mib[0] = CTL_KERN; | |
606 | mib[1] = KERN_ROOT_DEVICE; | 610 | mib[1] = KERN_ROOT_DEVICE; | |
607 | varlen = sizeof(rootdev); | 611 | varlen = sizeof(rootdev); | |
608 | (void)sysctl(mib, 2, rootdev, &varlen, NULL, 0); | 612 | (void)sysctl(mib, 2, rootdev, &varlen, NULL, 0); | |
609 | if (stat(set_dir_bin, &sb) == 0 && S_ISDIR(sb.st_mode) && | 613 | if (stat(set_dir_bin, &sb) == 0 && S_ISDIR(sb.st_mode) && | |
610 | strncmp("md", rootdev, 2) != 0) { | 614 | strncmp("md", rootdev, 2) != 0) { | |
611 | strlcpy(ext_dir_bin, set_dir_bin, sizeof ext_dir_bin); | 615 | strlcpy(ext_dir_bin, set_dir_bin, sizeof ext_dir_bin); | |
612 | strlcpy(ext_dir_src, set_dir_src, sizeof ext_dir_src); | 616 | strlcpy(ext_dir_src, set_dir_src, sizeof ext_dir_src); | |
613 | return SET_OK; | 617 | return SET_OK; | |
614 | } | 618 | } | |
615 | 619 | |||
616 | memset(cd_menu, 0, sizeof(cd_menu)); | 620 | memset(cd_menu, 0, sizeof(cd_menu)); | |
617 | num_cds = get_available_cds(); | 621 | num_cds = get_available_cds(); | |
618 | if (num_cds <= 0) { | 622 | if (num_cds <= 0) { | |
619 | hit_enter_to_continue(MSG_No_cd_found, NULL); | 623 | msg_display(MSG_No_cd_found); | |
620 | return SET_RETRY; | 624 | cdrom_dev[0] = 0; | |
621 | } else if (num_cds == 1) { | 625 | } else if (num_cds == 1) { | |
622 | /* single CD found, check for sets on it */ | 626 | /* single CD found, check for sets on it */ | |
623 | strcpy(cdrom_dev, cds[0].device_name); | 627 | strcpy(cdrom_dev, cds[0].device_name); | |
624 | if (cd_has_sets()) | 628 | if (cd_has_sets()) | |
625 | return SET_OK; | 629 | return SET_OK; | |
626 | } else { | 630 | } else { | |
627 | for (i = 0; i< num_cds; i++) { | 631 | for (i = 0; i< num_cds; i++) { | |
628 | cd_menu[i].opt_name = cds[i].menu; | 632 | cd_menu[i].opt_name = cds[i].menu; | |
629 | cd_menu[i].opt_flags = OPT_EXIT; | 633 | cd_menu[i].opt_flags = OPT_EXIT; | |
630 | cd_menu[i].opt_action = set_menu_select; | 634 | cd_menu[i].opt_action = set_menu_select; | |
631 | } | 635 | } | |
632 | /* create a menu offering available choices */ | 636 | /* create a menu offering available choices */ | |
633 | menu_cd = new_menu(MSG_Available_cds, | 637 | menu_cd = new_menu(MSG_Available_cds, | |
634 | cd_menu, num_cds, -1, 4, 0, 0, | 638 | cd_menu, num_cds, -1, 4, 0, 0, | |
635 | MC_SCROLL | MC_NOEXITOPT, | 639 | MC_SCROLL | MC_NOEXITOPT, | |
636 | NULL, NULL, NULL, NULL, NULL); | 640 | NULL, NULL, NULL, NULL, NULL); | |
637 | if (menu_cd == -1) | 641 | if (menu_cd == -1) | |
638 | return SET_RETRY; | 642 | return SET_RETRY; | |
639 | msg_display(MSG_ask_cd); | 643 | msg_display(MSG_ask_cd); | |
640 | process_menu(menu_cd, &selected_cd); | 644 | process_menu(menu_cd, &selected_cd); | |
641 | free_menu(menu_cd); | 645 | free_menu(menu_cd); | |
642 | strcpy(cdrom_dev, cds[selected_cd].device_name); | 646 | strcpy(cdrom_dev, cds[selected_cd].device_name); | |
643 | if (cd_has_sets()) | 647 | if (cd_has_sets()) | |
644 | return SET_OK; | 648 | return SET_OK; | |
645 | } | 649 | } | |
646 | 650 | |||
647 | if (silent) | 651 | if (num_cds >= 1 && mnt2_mounted) { | |
648 | msg_display(""); | |||
649 | else { | |||
650 | umount_mnt2(); | 652 | umount_mnt2(); | |
651 | hit_enter_to_continue(MSG_cd_path_not_found, NULL); | 653 | hit_enter_to_continue(MSG_cd_path_not_found, NULL); | |
652 | } | 654 | } | |
653 | 655 | |||
654 | /* ask for paths on the CD */ | 656 | /* ask for paths on the CD */ | |
655 | rv = -1; | 657 | rv = -1; | |
656 | process_menu(MENU_cdromsource, &rv); | 658 | process_menu(MENU_cdromsource, &rv); | |
657 | if (rv == SET_RETRY) | 659 | if (rv == SET_RETRY || rv == SET_ABANDON) | |
658 | return SET_RETRY; | 660 | return rv; | |
659 | 661 | |||
660 | if (cd_has_sets()) | 662 | if (cd_has_sets()) | |
661 | return SET_OK; | 663 | return SET_OK; | |
662 | 664 | |||
663 | return SET_RETRY; | 665 | return SET_RETRY; | |
664 | } | 666 | } | |
665 | 667 | |||
666 | 668 | |||
667 | /* | 669 | /* | |
668 | * Get from a pathname inside an unmounted local filesystem | 670 | * Get from a pathname inside an unmounted local filesystem | |
669 | * (e.g., where sets were preloaded onto a local DOS partition) | 671 | * (e.g., where sets were preloaded onto a local DOS partition) | |
670 | */ | 672 | */ | |
671 | int | 673 | int |