Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/usr.sbin/sysinst When looking for available CD media, skip t...



details:   https://anonhg.NetBSD.org/src/rev/b6f2b80c68f8
branches:  trunk
changeset: 941587:b6f2b80c68f8
user:      martin <martin%NetBSD.org@localhost>
date:      Sat Oct 24 16:13:15 2020 +0000

description:
When looking for available CD media, skip those that are already mounted.
When no medium with sets is found, show a new error message and return
to the source selection menu.
Rearrange all source option menus to have the proper set suffix
available (either .tgz or .tar.xz).

diffstat:

 usr.sbin/sysinst/menus.mi  |  20 +++++++++++++-------
 usr.sbin/sysinst/msg.mi.de |  31 +++++++++++++++++++++++++------
 usr.sbin/sysinst/msg.mi.en |  32 ++++++++++++++++++++++++++------
 usr.sbin/sysinst/msg.mi.es |  32 ++++++++++++++++++++++++++------
 usr.sbin/sysinst/msg.mi.fr |  13 ++++++++++---
 usr.sbin/sysinst/msg.mi.pl |  34 ++++++++++++++++++++++++++--------
 usr.sbin/sysinst/util.c    |  37 ++++++++++++++++++++++++++++++++-----
 7 files changed, 158 insertions(+), 41 deletions(-)

diffs (truncated from 523 to 300 lines):

diff -r 4ed1800e70b8 -r b6f2b80c68f8 usr.sbin/sysinst/menus.mi
--- a/usr.sbin/sysinst/menus.mi Sat Oct 24 15:16:39 2020 +0000
+++ b/usr.sbin/sysinst/menus.mi Sat Oct 24 16:13:15 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: menus.mi,v 1.21 2020/01/27 21:21:22 martin Exp $       */
+/*     $NetBSD: menus.mi,v 1.22 2020/10/24 16:13:15 martin Exp $       */
 
 /*-
  * Copyright (c) 2003 The NetBSD Foundation, Inc.
@@ -362,8 +362,10 @@
 
 menu ftpsource, y=-4, x=0, w=70, no box, no clear,
            exitstring MSG_Get_Distribution;
-       display action { msg_fmt_display(MSG_ftpsource, "%s",
-           url_proto((uintptr_t)((arg_rv*)arg)->arg)); };
+       display action {
+               msg_display_subst(MSG_ftpsource, 2, "." SETS_TAR_SUFF,
+                   url_proto((uintptr_t)((arg_rv*)arg)->arg));
+           };
        option {src_legend(menu, MSG_Host, ftp.xfer_host[(uintptr_t)((arg_rv*)arg)->arg]);},
                action { src_prompt(MSG_Host, ftp.xfer_host[(uintptr_t)((arg_rv*)arg)->arg], sizeof ftp.xfer_host[(uintptr_t)((arg_rv*)arg)->arg]); };
        option {src_legend(menu, MSG_Base_dir, ftp.dir);},
@@ -412,7 +414,8 @@
 
 menu nfssource, y=-4, x=0, w=70, no box, no clear,
            exitstring MSG_Get_Distribution;
-       display action { msg_display(MSG_nfssource); };
+       display action { const char suff[] = "." SETS_TAR_SUFF;
+               msg_display_subst(MSG_nfssource, 1, &suff); };
        option {src_legend(menu, MSG_Host, nfs_host);},
                action { src_prompt(MSG_Host, nfs_host, sizeof nfs_host); };
        option {src_legend(menu, MSG_Base_dir, nfs_dir);},
@@ -459,7 +462,8 @@
        option MSG_exit_menu_generic, exit, action { *((int*)arg) = SET_RETRY; };
 
 menu cdromsource, y=-4, x=0, w=70, no box, no clear, exitstring MSG_Continue;
-       display action { msg_display(MSG_cdromsource); };
+       display action { const char suff[] = "." SETS_TAR_SUFF;
+               msg_display_subst(MSG_cdromsource, 1, &suff); };
        option {src_legend(menu, MSG_Device, cdrom_dev);},
                action { src_prompt(MSG_dev, cdrom_dev, sizeof cdrom_dev); };
        option {src_legend(menu, MSG_Set_dir_bin, set_dir_bin);},
@@ -469,7 +473,8 @@
        option MSG_exit_menu_generic, exit, action { *((int*)arg) = SET_RETRY; };
 
 menu localfssource, y=-4, x=0, w=70, no box, no clear, exitstring MSG_Continue;
-       display action { msg_display(MSG_localfssource); };
+       display action { const char suff[] = "." SETS_TAR_SUFF;
+               msg_display_subst(MSG_localfssource, 1, &suff); };
        option {src_legend(menu, MSG_Device, localfs_dev);},
                action { src_prompt(MSG_dev, localfs_dev, sizeof localfs_dev);};
        option {src_legend(menu, MSG_File_system, localfs_fs);},
@@ -483,7 +488,8 @@
        option MSG_exit_menu_generic, exit, action { *((int*)arg) = SET_RETRY; };
 
 menu localdirsource, y=-4, x=0, w=70, no box, no clear, exitstring MSG_Continue;
-       display action { msg_display(MSG_localdir); };
+       display action { const char suff[] = "." SETS_TAR_SUFF;
+               msg_display_subst(MSG_localdir, 1, &suff); };
        option {src_legend(menu, MSG_Base_dir, localfs_dir);},
                action { src_prompt(MSG_Base_dir, localfs_dir, 60); };
        option {src_legend(menu, MSG_Set_dir_bin, set_dir_bin);},
diff -r 4ed1800e70b8 -r b6f2b80c68f8 usr.sbin/sysinst/msg.mi.de
--- a/usr.sbin/sysinst/msg.mi.de        Sat Oct 24 15:16:39 2020 +0000
+++ b/usr.sbin/sysinst/msg.mi.de        Sat Oct 24 16:13:15 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.mi.de,v 1.24 2020/10/13 17:26:28 martin Exp $      */
+/*     $NetBSD: msg.mi.de,v 1.25 2020/10/24 16:13:15 martin Exp $      */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -507,8 +507,12 @@
 definierten Satz auszuwählen.
 }
 
+/* Called with:                        Example
+ *  $0 = sets suffix                   .tgz
+ *  $1 = URL protocol used             ftp
+ */
 message ftpsource
-{Dies sind die Daten zum Aufbau einer %s-Verbindung.
+{Dies sind die Daten zum Aufbau einer $1-Verbindung.
 Falls der Benutzer "ftp" ist, benötigen Sie kein Passwort.
 
 }
@@ -519,10 +523,13 @@
 message dev
 {Laufwerk}
 
+/* Called with:                        Example
+ *  $0 = sets suffix                   .tgz
+ */
 message nfssource
 {Geben Sie den NFS-Server samt Verzeichnis an, auf dem die Distribution zu
 finden ist.
-(Das Verzeichnis muss .tgz Dateien enthalten und über NFS mountbar sein.)
+(Das Verzeichnis muss $0 Dateien enthalten und über NFS mountbar sein.)
 
 }
 
@@ -533,13 +540,19 @@
 
 }
 
+/* Called with:                        Example
+ *  $0 = sets suffix                   .tgz
+ */
 message cdromsource
 {Geben Sie das CD-Laufwerk und das entsprechende Verzeichnis an, in dem
 die Distribution zu finden ist.
-(Das Verzeichnis muss .tgz Dateien enthalten.)
+(Das Verzeichnis muss $0 Dateien enthalten.)
 
 }
 
+message No_cd_found
+{Kein CD Laufwerk enthält eine CD mit den Distributions-Dateien!}
+
 message Available_cds
 {Verfügbare CDs}
 
@@ -550,17 +563,23 @@
 {Die Installationsdateien wurden auf der ausgewählten CD nicht gefunden. Bitte
 prüfen Sie den Gerätenamen und Pfad der Installationsdateien.}
 
+/* Called with:                        Example
+ *  $0 = sets suffix                   .tgz
+ */
 message localfssource
 {Geben Sie das noch nicht gemountete lokale Gerät und dessen entsprechendes
 Verzeichnis an, in dem die Distribution zu finden ist.
-(Das Verzeichnis muss .tgz Dateien enthalten.)
+(Das Verzeichnis muss $0 Dateien enthalten.)
 
 }
 
+/* Called with:                        Example
+ *  $0 = sets suffix                   .tgz
+ */
 message localdir
 {Geben Sie das Verzeichnis des bereits gemounteten lokalen Geräts an, in dem
 die Distribution zu finden ist.
-(Das Verzeichnis muss .tgz Dateien enthalten.)
+(Das Verzeichnis muss $0 Dateien enthalten.)
 
 }
 
diff -r 4ed1800e70b8 -r b6f2b80c68f8 usr.sbin/sysinst/msg.mi.en
--- a/usr.sbin/sysinst/msg.mi.en        Sat Oct 24 15:16:39 2020 +0000
+++ b/usr.sbin/sysinst/msg.mi.en        Sat Oct 24 16:13:15 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.mi.en,v 1.32 2020/10/13 17:26:28 martin Exp $      */
+/*     $NetBSD: msg.mi.en,v 1.33 2020/10/24 16:13:15 martin Exp $      */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -487,8 +487,12 @@
 group of sets (Custom installation).
 }
 
+/* Called with:                        Example
+ *  $0 = sets suffix                   .tgz
+ *  $1 = URL protocol used             ftp
+ */
 message ftpsource
-{The following are the %s site, directory, user, and password that
+{The following are the $1 site, directory, user, and password that
 will be used.  If "user" is "ftp", then the password is not needed.
 
 }
@@ -499,9 +503,12 @@
 message dev
 {device}
 
+/* Called with:                        Example
+ *  $0 = sets suffix                   .tgz
+ */
 message nfssource
 {Enter the nfs host and server directory where the distribution is located. 
-Remember, the directory should contain the .tgz files and
+Remember, the directory should contain the $0 files and
 must be nfs mountable.
 
 }
@@ -512,13 +519,20 @@
 
 }
 
+/* Called with:                        Example
+ *  $0 = sets suffix                   .tgz
+ */
 message cdromsource
 {Enter the CDROM device to be used and directory on the CDROM where
 the distribution is located. 
-Remember, the directory should contain the .tgz files.
+Remember, the directory should contain the $0 files.
 
 }
 
+message No_cd_found
+{Could not locate a CD medium in any drive with the distribution sets. 
+Check the proper medium and retry!}
+
 message Available_cds
 {Available CDs }
 
@@ -529,16 +543,22 @@
 {The installation sets have not been found at the default location on this
 CD.  Please check the device and path name.}
 
+/* Called with:                        Example
+ *  $0 = sets suffix                   .tgz
+ */
 message localfssource
 {Enter the unmounted local device and directory on that device where
 the distribution is located. 
-Remember, the directory should contain the .tgz files.
+Remember, the directory should contain the $0 files.
 
 }
 
+/* Called with:                        Example
+ *  $0 = sets suffix                   .tgz
+ */
 message localdir
 {Enter the already-mounted local directory where the distribution is located. 
-Remember, the directory should contain the .tgz files.
+Remember, the directory should contain the $0 files.
 
 }
 
diff -r 4ed1800e70b8 -r b6f2b80c68f8 usr.sbin/sysinst/msg.mi.es
--- a/usr.sbin/sysinst/msg.mi.es        Sat Oct 24 15:16:39 2020 +0000
+++ b/usr.sbin/sysinst/msg.mi.es        Sat Oct 24 16:13:15 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: msg.mi.es,v 1.26 2020/10/13 17:26:28 martin Exp $      */
+/*     $NetBSD: msg.mi.es,v 1.27 2020/10/24 16:13:15 martin Exp $      */
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -502,8 +502,12 @@
 seleccionar de entre los conjuntos de distribución opcionales.
 }
 
+/* Called with:                        Example
+ *  $0 = sets suffix                   .tgz
+ *  $1 = URL protocol used             ftp
+ */
 message ftpsource
-{Lo siguiente son el sitio %s, directorio, usuario y contraseña que se
+{Lo siguiente son el sitio $1, directorio, usuario y contraseña que se
 usarán.  Si «usuario» es «ftp», no se necesita contraseña..
 
 }
@@ -514,9 +518,12 @@
 message dev
 {dispositivo}
 
+/* Called with:                        Example
+ *  $0 = sets suffix                   .tgz
+ */
 message nfssource
 {Introduzca el servidor nfs y el directorio del servidor donde se encuentre
-la distribución.  Recuerde: el directorio debe contener los archivos .tgz y
+la distribución.  Recuerde: el directorio debe contener los archivos $0 y
 debe ser montable por nfs.
 
 }
@@ -528,13 +535,20 @@
 
 }
 
+/* Called with:                        Example
+ *  $0 = sets suffix                   .tgz
+ */
 message cdromsource
 {Introduzca el dispositivo de CDROM a usar y el directorio del CDROM
 donde se encuentre la distribución.
-Recuerde, el directorio debe contener los archivos .tgz.
+Recuerde, el directorio debe contener los archivos $0.
 
 }
 
+message No_cd_found
+{Could not locate a CD medium in any drive with the distribution sets. 
+Check the proper medium and retry!}
+
 message Available_cds
 {Available CDs}
 
@@ -545,16 +559,22 @@
 {The installation sets have not been found at the default location on this
 CD. Please check device and path name.}
 
+/* Called with:                        Example
+ *  $0 = sets suffix                   .tgz
+ */
 message localfssource
 {Introduzca el dispositivo local desmontado y el directorio de ese
 dispositivo donde se encuentre la distribución. 



Home | Main Index | Thread Index | Old Index