Module Name:    src
Committed By:   riz
Date:           Sun Nov 18 22:04:44 UTC 2012

Modified Files:
        src/distrib/utils/sysinst [netbsd-6]: msg.mi.de msg.mi.en msg.mi.es
            msg.mi.fr msg.mi.pl util.c
        src/distrib/utils/sysinst/arch/amd64 [netbsd-6]: Makefile
        src/distrib/utils/sysinst/arch/i386 [netbsd-6]: Makefile

Log Message:
Pull up following revision(s) (requested by tsutsui in ticket #649):
        distrib/utils/sysinst/msg.mi.es: revision 1.48
        distrib/utils/sysinst/arch/i386/Makefile: revision 1.18
        distrib/utils/sysinst/msg.mi.en: revision 1.176
        distrib/utils/sysinst/arch/amd64/Makefile: revision 1.8
        distrib/utils/sysinst/msg.mi.de: revision 1.71
        distrib/utils/sysinst/msg.mi.fr: revision 1.130
        distrib/utils/sysinst/util.c: revision 1.180
        distrib/utils/sysinst/msg.mi.pl: revision 1.87
Make the default choice of "Install from" menu to use the sets
in the default file system (assuming which come with the CD/USB image)
and skip distmedium menu if the root file system is not md(4).
Also change "CD-ROM / DVD" menu option accordingly on ports which
have install images.  PR/47038
XXX: still no responsible maintainer of non-en translations


To generate a diff of this commit:
cvs rdiff -u -r1.61.2.3 -r1.61.2.4 src/distrib/utils/sysinst/msg.mi.de
cvs rdiff -u -r1.169.2.3 -r1.169.2.4 src/distrib/utils/sysinst/msg.mi.en
cvs rdiff -u -r1.39.2.4 -r1.39.2.5 src/distrib/utils/sysinst/msg.mi.es
cvs rdiff -u -r1.119.2.3 -r1.119.2.4 src/distrib/utils/sysinst/msg.mi.fr
cvs rdiff -u -r1.78.2.3 -r1.78.2.4 src/distrib/utils/sysinst/msg.mi.pl
cvs rdiff -u -r1.173.2.1 -r1.173.2.2 src/distrib/utils/sysinst/util.c
cvs rdiff -u -r1.7 -r1.7.54.1 src/distrib/utils/sysinst/arch/amd64/Makefile
cvs rdiff -u -r1.17 -r1.17.54.1 src/distrib/utils/sysinst/arch/i386/Makefile

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/distrib/utils/sysinst/msg.mi.de
diff -u src/distrib/utils/sysinst/msg.mi.de:1.61.2.3 src/distrib/utils/sysinst/msg.mi.de:1.61.2.4
--- src/distrib/utils/sysinst/msg.mi.de:1.61.2.3	Sun Sep 30 18:53:58 2012
+++ src/distrib/utils/sysinst/msg.mi.de	Sun Nov 18 22:04:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.de,v 1.61.2.3 2012/09/30 18:53:58 bouyer Exp $	*/
+/*	$NetBSD: msg.mi.de,v 1.61.2.4 2012/11/18 22:04:43 riz Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -976,7 +976,11 @@ message Select_medium {Medium auswählen}
 message ftp {FTP}
 message http {HTTP}
 message nfs {NFS}
+.if HAVE_INSTALL_IMAGE
+message cdrom {CD-ROM / DVD / install image media}	/* XXX translation */
+.else
 message cdrom {CD-ROM / DVD}
+.endif
 message floppy {Diskette}
 message local_fs {Ungemountetes Dateisysytem}
 message local_dir {Lokales Verzeichnis}

Index: src/distrib/utils/sysinst/msg.mi.en
diff -u src/distrib/utils/sysinst/msg.mi.en:1.169.2.3 src/distrib/utils/sysinst/msg.mi.en:1.169.2.4
--- src/distrib/utils/sysinst/msg.mi.en:1.169.2.3	Sun Sep 30 18:53:58 2012
+++ src/distrib/utils/sysinst/msg.mi.en	Sun Nov 18 22:04:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.en,v 1.169.2.3 2012/09/30 18:53:58 bouyer Exp $	*/
+/*	$NetBSD: msg.mi.en,v 1.169.2.4 2012/11/18 22:04:43 riz Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -916,7 +916,11 @@ message Select_medium {Install from}
 message ftp {FTP}
 message http {HTTP}
 message nfs {NFS}
+.if HAVE_INSTALL_IMAGE
+message cdrom {CD-ROM / DVD / install image media}
+.else
 message cdrom {CD-ROM / DVD}
+.endif
 message floppy {Floppy}
 message local_fs {Unmounted fs}
 message local_dir {Local directory}

Index: src/distrib/utils/sysinst/msg.mi.es
diff -u src/distrib/utils/sysinst/msg.mi.es:1.39.2.4 src/distrib/utils/sysinst/msg.mi.es:1.39.2.5
--- src/distrib/utils/sysinst/msg.mi.es:1.39.2.4	Sun Sep 30 18:53:57 2012
+++ src/distrib/utils/sysinst/msg.mi.es	Sun Nov 18 22:04:42 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.es,v 1.39.2.4 2012/09/30 18:53:57 bouyer Exp $	*/
+/*	$NetBSD: msg.mi.es,v 1.39.2.5 2012/11/18 22:04:42 riz Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -942,7 +942,11 @@ message Select_medium {Seleccione el med
 message ftp {FTP}
 message http {HTTP}
 message nfs {NFS}
+.if HAVE_INSTALL_IMAGE
+message cdrom {CD-ROM / DVD / install image media}	/* XXX translation */
+.else
 message cdrom {CD-ROM / DVD}
+.endif
 message floppy {Disquete}
 message local_fs {Sistema de archivos desmontado}
 message local_dir {Directorio Local}

Index: src/distrib/utils/sysinst/msg.mi.fr
diff -u src/distrib/utils/sysinst/msg.mi.fr:1.119.2.3 src/distrib/utils/sysinst/msg.mi.fr:1.119.2.4
--- src/distrib/utils/sysinst/msg.mi.fr:1.119.2.3	Sun Sep 30 18:53:57 2012
+++ src/distrib/utils/sysinst/msg.mi.fr	Sun Nov 18 22:04:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.fr,v 1.119.2.3 2012/09/30 18:53:57 bouyer Exp $	*/
+/*	$NetBSD: msg.mi.fr,v 1.119.2.4 2012/11/18 22:04:43 riz Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -1014,7 +1014,11 @@ message Select_medium {Sélection du médi
 message ftp {FTP}
 message http {HTTP}
 message nfs {NFS}
+.if HAVE_INSTALL_IMAGE
+message cdrom {CD-ROM / DVD / install image media}	/* XXX translation */
+.else
 message cdrom {CD-ROM / DVD}
+.endif
 message floppy {Disquette}
 message local_fs {Système de fichiers non-monté}
 message local_dir {Répertoire local monté}

Index: src/distrib/utils/sysinst/msg.mi.pl
diff -u src/distrib/utils/sysinst/msg.mi.pl:1.78.2.3 src/distrib/utils/sysinst/msg.mi.pl:1.78.2.4
--- src/distrib/utils/sysinst/msg.mi.pl:1.78.2.3	Sun Sep 30 18:53:58 2012
+++ src/distrib/utils/sysinst/msg.mi.pl	Sun Nov 18 22:04:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.pl,v 1.78.2.3 2012/09/30 18:53:58 bouyer Exp $	*/
+/*	$NetBSD: msg.mi.pl,v 1.78.2.4 2012/11/18 22:04:43 riz Exp $	*/
 /*	Based on english version: */
 /*	NetBSD: msg.mi.pl,v 1.36 2004/04/17 18:55:35 atatat Exp       */
 
@@ -913,7 +913,11 @@ message Select_medium {Wybierz medium}
 message ftp {FTP}
 message http {HTTP}
 message nfs {NFS}
+.if HAVE_INSTALL_IMAGE
+message cdrom {CD-ROM / DVD / install image media}	/* XXX translation */
+.else
 message cdrom {CD-ROM / DVD}
+.endif
 message floppy {Dyskietka}
 message local_fs {Niezamontowany SP}
 message local_dir {Lokalny katalog}

Index: src/distrib/utils/sysinst/util.c
diff -u src/distrib/utils/sysinst/util.c:1.173.2.1 src/distrib/utils/sysinst/util.c:1.173.2.2
--- src/distrib/utils/sysinst/util.c:1.173.2.1	Thu May 17 18:57:11 2012
+++ src/distrib/utils/sysinst/util.c	Sun Nov 18 22:04:43 2012
@@ -1,4 +1,4 @@
-/*	$NetBSD: util.c,v 1.173.2.1 2012/05/17 18:57:11 sborrill Exp $	*/
+/*	$NetBSD: util.c,v 1.173.2.2 2012/11/18 22:04:43 riz Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -520,19 +520,27 @@ boot_media_still_needed(void)
 
 /*
  * Get from a CDROM distribution.
+ * Also used on "installation using bootable install media"
+ * as the default option in the "distmedium" menu.
  */
 int
 get_via_cdrom(void)
 {
 	menu_ent cd_menu[MAX_CD_INFOS];
-	struct statvfs sb;
+	struct stat sb;
 	int num_cds, menu_cd, i, selected_cd = 0;
 	bool silent = false;
-
-	/* If root is a CD-ROM and we have sets, skip this step. */
-	if (statvfs(set_dir_bin, &sb) == 0 &&
-	    (strcmp(sb.f_fstypename, MOUNT_CD9660) == 0
-		    || strcmp(sb.f_fstypename, MOUNT_UDF) == 0)) {
+	int mib[2];
+	char rootdev[SSTRSIZE] = "";
+	size_t varlen;
+
+	/* If root is not md(4) and we have set dir, skip this step. */
+	mib[0] = CTL_KERN;
+	mib[1] = KERN_ROOT_DEVICE;
+	varlen = sizeof(rootdev);
+	(void)sysctl(mib, 2, rootdev, &varlen, NULL, 0);
+	if (stat(set_dir_bin, &sb) == 0 && S_ISDIR(sb.st_mode) &&
+	    strncmp("md", rootdev, 2) != 0) {
 	    	strlcpy(ext_dir_bin, set_dir_bin, sizeof ext_dir_bin);
 	    	strlcpy(ext_dir_src, set_dir_src, sizeof ext_dir_src);
 		return SET_OK;

Index: src/distrib/utils/sysinst/arch/amd64/Makefile
diff -u src/distrib/utils/sysinst/arch/amd64/Makefile:1.7 src/distrib/utils/sysinst/arch/amd64/Makefile:1.7.54.1
--- src/distrib/utils/sysinst/arch/amd64/Makefile:1.7	Sat Feb 19 17:00:38 2005
+++ src/distrib/utils/sysinst/arch/amd64/Makefile	Sun Nov 18 22:04:44 2012
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.7 2005/02/19 17:00:38 dsl Exp $
+#	$NetBSD: Makefile,v 1.7.54.1 2012/11/18 22:04:44 riz Exp $
 #
 # Makefile for amd64
 #
 
 MENUS_MD=	../i386/menus.md menus.mbr
 MSG_MD=		../i386/msg.md.${SYSINSTLANG} msg.mbr.${SYSINSTLANG}
-MD_OPTIONS=	BOOTSEL AOUT2ELF
+MD_OPTIONS=	BOOTSEL AOUT2ELF HAVE_INSTALL_IMAGE
 
 CPPFLAGS+=	-DBOOTSEL -DWSKBD
 

Index: src/distrib/utils/sysinst/arch/i386/Makefile
diff -u src/distrib/utils/sysinst/arch/i386/Makefile:1.17 src/distrib/utils/sysinst/arch/i386/Makefile:1.17.54.1
--- src/distrib/utils/sysinst/arch/i386/Makefile:1.17	Sat Feb 19 17:00:39 2005
+++ src/distrib/utils/sysinst/arch/i386/Makefile	Sun Nov 18 22:04:43 2012
@@ -1,11 +1,11 @@
-#	$NetBSD: Makefile,v 1.17 2005/02/19 17:00:39 dsl Exp $
+#	$NetBSD: Makefile,v 1.17.54.1 2012/11/18 22:04:43 riz Exp $
 #
 # Makefile for i386
 #
 
 MENUS_MD=	menus.md menus.mbr
 MSG_MD=		msg.md.${SYSINSTLANG} msg.mbr.${SYSINSTLANG}
-MD_OPTIONS=	BOOTSEL AOUT2ELF
+MD_OPTIONS=	BOOTSEL AOUT2ELF HAVE_INSTALL_IMAGE
 
 CPPFLAGS+=	-DBOOTSEL -DWSKBD
 # CPPFLAGS+=	-DNO_LBA_READS

Reply via email to