Pull up following revision(s) (requested by martin in ticket #759): netbsd-7
authorsnj <snj@NetBSD.org>
Thu, 14 May 2015 07:11:53 +0000
branchnetbsd-7
changeset 254295 be0fd877755a
parent 254294 4b421fe8635a
child 254296 d460fd20a219
Pull up following revision(s) (requested by martin in ticket #759): distrib/amd64/cdroms/Makefile.cdrom: revision 1.12 distrib/amd64/installimage/Makefile: revision 1.5 distrib/amd64/installimage/spec.inst: revision 1.2 distrib/common/10-resolv.conf: file removal distrib/common/99-print-sysinst: file removal distrib/common/Makefile.dhcpcd: revision 1.2 distrib/common/list.dhcpcd: revision 1.3 distrib/i386/cdroms/Makefile.cdrom: revision 1.32 distrib/i386/installimage/Makefile: revision 1.5 distrib/i386/installimage/spec.inst: revision 1.2 distrib/sparc64/cdroms/installcd/Makefile: revision 1.20 distrib/vax/cdroms/installcd/Makefile: revision 1.10 usr.sbin/sysinst/msg.mi.de: revision 1.4 usr.sbin/sysinst/msg.mi.en: revision 1.4 usr.sbin/sysinst/msg.mi.es: revision 1.4 usr.sbin/sysinst/msg.mi.fr: revision 1.4 usr.sbin/sysinst/msg.mi.pl: revision 1.4 usr.sbin/sysinst/net.c: revisions 1.5-1.8, 1.11-1.15 The dhcpcd utilties in pkgsrc require dhcpcd to be running in master mode. So set dhcpcd to start like so, but restrict it to the configured interface still instead of ifconfig_foo=dhcp. -- Use the 20-resolv.conf hook from dhcpcd rather than the minimal one. Extract configured information from resolv.conf and hostname instead of scraping the last dhcpcd script run. This will allow the use of DHCPv6 and IPv6RA DNS details in the future. -- dhcpcd will already have configured the system at this point, so don't bother writing it manually. -- Don't prompt for hostname or domain if obtained from DHCP. -- Change the display order so it's protocol agnostic at the top, then IPv4 then IPv6. -- Strip newline from the gateway correctly. -- Show the IP6 address instead of yes -- Fix a bogus gcc warning: dhcp_config may be used uninitialized -- Punt custom dhcpcd hooks in favour up upstream hooks -- For the benefit of gcc 4.5, rename a local "nl" variable to "nline", so it doesn't collide with the global curses nl() function.
distrib/amd64/cdroms/Makefile.cdrom
distrib/amd64/installimage/Makefile
distrib/amd64/installimage/spec.inst
distrib/common/10-resolv.conf
distrib/common/99-print-sysinst
distrib/common/Makefile.dhcpcd
distrib/common/list.dhcpcd
distrib/i386/cdroms/Makefile.cdrom
distrib/i386/installimage/Makefile
distrib/i386/installimage/spec.inst
distrib/sparc64/cdroms/installcd/Makefile
distrib/vax/cdroms/installcd/Makefile
usr.sbin/sysinst/msg.mi.de
usr.sbin/sysinst/msg.mi.en
usr.sbin/sysinst/msg.mi.es
usr.sbin/sysinst/msg.mi.fr
usr.sbin/sysinst/msg.mi.pl
usr.sbin/sysinst/net.c
--- a/distrib/amd64/cdroms/Makefile.cdrom	Thu May 14 06:44:57 2015 +0000
+++ b/distrib/amd64/cdroms/Makefile.cdrom	Thu May 14 07:11:53 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.cdrom,v 1.10.2.1 2014/08/15 10:23:22 martin Exp $
+# $NetBSD: Makefile.cdrom,v 1.10.2.2 2015/05/14 07:11:53 snj Exp $
 
 .include <bsd.own.mk>
 
@@ -65,9 +65,6 @@
 CDRUNTIME+=	./usr/share/locale
 
 image_md_pre:
-	${MKDIR} cdrom/libexec/dhcpcd-hooks
-	${INSTALL} ${COPY} ${.CURDIR}/../../../common/10-resolv.conf cdrom/libexec/dhcpcd-hooks
-	${INSTALL} ${COPY} ${.CURDIR}/../../../common/99-print-sysinst cdrom/libexec/dhcpcd-hooks
 	${MKDIR} cdrom/etc
 	${HOST_LN} -fs /tmp/gettytab cdrom/etc/gettytab
 	${INSTALL} ${COPY} ${.CURDIR}/../etc.ttys cdrom/etc/ttys
--- a/distrib/amd64/installimage/Makefile	Thu May 14 06:44:57 2015 +0000
+++ b/distrib/amd64/installimage/Makefile	Thu May 14 07:11:53 2015 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4 2014/07/26 19:34:08 dholland Exp $
+#	$NetBSD: Makefile,v 1.4.2.1 2015/05/14 07:11:53 snj Exp $
 
 .include <bsd.own.mk>
 
@@ -26,8 +26,6 @@
 
 SPEC_EXTRA=		${.CURDIR}/spec.inst
 IMGFILE_EXTRA=								\
-	${DISTRIBDIR}/common/10-resolv.conf	libexec/dhcpcd-hooks	\
-	${DISTRIBDIR}/common/99-print-sysinst	libexec/dhcpcd-hooks	\
 	${.CURDIR}/etc.ttys		etc/ttys			\
 	${.CURDIR}/etc.rc		etc/rc				\
 	${.CURDIR}/install.sh		.				\
--- a/distrib/amd64/installimage/spec.inst	Thu May 14 06:44:57 2015 +0000
+++ b/distrib/amd64/installimage/spec.inst	Thu May 14 07:11:53 2015 +0000
@@ -1,10 +1,7 @@
-# $NetBSD: spec.inst,v 1.1 2012/01/22 03:53:29 tsutsui Exp $
+# $NetBSD: spec.inst,v 1.1.22.1 2015/05/14 07:11:53 snj Exp $
 ./mnt2			type=dir mode=0755 uname=root gname=wheel
 ./targetroot		type=dir mode=0755 uname=root gname=wheel
 
-./libexec/dhcpcd-hooks/10-resolv.conf	type=file mode=0444 uname=root gname=wheel
-./libexec/dhcpcd-hooks/99-print-sysinst	type=file mode=0444 uname=root gname=wheel
-
 ./install.sh		type=file mode=0755 uname=root gname=wheel
 ./sysinst		type=file mode=0755 uname=root gname=wheel
 ./sysinstmsgs.de	type=file mode=0444 uname=root gname=wheel
--- a/distrib/common/10-resolv.conf	Thu May 14 06:44:57 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,22 +0,0 @@
-# Minimal version using shell builtins.
-
-make_resolv_conf()
-{
-	if [ -z "${new_domain_name_servers}" -a \
-		-z "${new_domain_name}" -a \
-		-z "${new_domain_search}" ]; then
-		return 0
-	fi
-	if [ -n "${new_domain_search}" ]; then
-		echo "search ${new_domain_search}" >> /etc/resolv.conf
-	elif [ -n "${new_domain_name}" ]; then
-		echo "search ${new_domain_name}" >> /etc/resolv.conf
-	fi
-	for x in ${new_domain_name_servers}; do
-		echo "nameserver ${x}" >> /etc/resolv.conf
-	done
-}
-
-case "${reason}" in
-BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT)	make_resolv_conf;;
-esac
--- a/distrib/common/99-print-sysinst	Thu May 14 06:44:57 2015 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,11 +0,0 @@
-# $NetBSD: 99-print-sysinst,v 1.1 2009/04/07 11:49:17 joerg Exp $
-
-case "${reason}" in
-BOUND|INFORM|REBIND|REBOOT|RENEW|TIMEOUT)
-	cat > /tmp/dhcpcd-lease << EOF
-host-name=${new_host_name}
-domain-name=${new_domain_name}
-EOF
-	set > /tmp/dhcpcd-lease-all
-	;;
-esac
--- a/distrib/common/Makefile.dhcpcd	Thu May 14 06:44:57 2015 +0000
+++ b/distrib/common/Makefile.dhcpcd	Thu May 14 07:11:53 2015 +0000
@@ -1,8 +1,9 @@
-# $NetBSD: Makefile.dhcpcd,v 1.1 2009/04/07 11:49:17 joerg Exp $
+# $NetBSD: Makefile.dhcpcd,v 1.1.28.1 2015/05/14 07:11:53 snj Exp $
 
 IMAGEDEPENDS+= 	\
 	${DESTDIR}/etc/dhcpcd.conf \
 	${DESTDIR}/libexec/dhcpcd-run-hooks \
+	${DESTDIR}/libexec/dhcpcd-hooks/20-resolv.conf \
 	${DESTDIR}/libexec/dhcpcd-hooks/30-hostname
 
 LISTS+=		${DISTRIBDIR}/common/list.dhcpcd
--- a/distrib/common/list.dhcpcd	Thu May 14 06:44:57 2015 +0000
+++ b/distrib/common/list.dhcpcd	Thu May 14 07:11:53 2015 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: list.dhcpcd,v 1.2 2011/05/31 06:19:11 christos Exp $
+#	$NetBSD: list.dhcpcd,v 1.2.24.1 2015/05/14 07:11:53 snj Exp $
 #
 # list file (c.f. parselist.awk) for DHCP-enabled install media.
 #
@@ -8,7 +8,5 @@
 
 COPY	${DESTDIR}/etc/dhcpcd.conf etc/dhcpcd.conf
 COPY	${DESTDIR}/libexec/dhcpcd-run-hooks libexec/dhcpcd-run-hooks 555
-
-COPY	${NETBSDSRCDIR}/distrib/common/10-resolv.conf libexec/dhcpcd-hooks/10-resolv.conf
+COPY	${DESTDIR}/libexec/dhcpcd-hooks/20-resolv.conf libexec/dhcpcd-hooks/20-resolv.conf
 COPY	${DESTDIR}/libexec/dhcpcd-hooks/30-hostname libexec/dhcpcd-hooks/30-hostname
-COPY	${NETBSDSRCDIR}/distrib/common/99-print-sysinst libexec/dhcpcd-hooks/99-print-sysinst
--- a/distrib/i386/cdroms/Makefile.cdrom	Thu May 14 06:44:57 2015 +0000
+++ b/distrib/i386/cdroms/Makefile.cdrom	Thu May 14 07:11:53 2015 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile.cdrom,v 1.30.2.1 2014/08/15 10:23:22 martin Exp $
+# $NetBSD: Makefile.cdrom,v 1.30.2.2 2015/05/14 07:11:53 snj Exp $
 
 .include <bsd.own.mk>
 
@@ -65,9 +65,6 @@
 CDRUNTIME+=	./usr/share/locale
 
 image_md_pre:
-	${MKDIR} cdrom/libexec/dhcpcd-hooks
-	${INSTALL} ${COPY} ${.CURDIR}/../../../common/10-resolv.conf cdrom/libexec/dhcpcd-hooks
-	${INSTALL} ${COPY} ${.CURDIR}/../../../common/99-print-sysinst cdrom/libexec/dhcpcd-hooks
 	${MKDIR} cdrom/etc
 	${HOST_LN} -fs /tmp/gettytab cdrom/etc/gettytab
 	${INSTALL} ${COPY} ${.CURDIR}/../etc.ttys cdrom/etc/ttys
--- a/distrib/i386/installimage/Makefile	Thu May 14 06:44:57 2015 +0000
+++ b/distrib/i386/installimage/Makefile	Thu May 14 07:11:53 2015 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.4.2.2 2015/03/12 19:06:22 snj Exp $
+#	$NetBSD: Makefile,v 1.4.2.3 2015/05/14 07:11:53 snj Exp $
 
 .include <bsd.own.mk>
 
@@ -26,8 +26,6 @@
 
 SPEC_EXTRA=		${.CURDIR}/spec.inst
 IMGFILE_EXTRA=								\
-	${DISTRIBDIR}/common/10-resolv.conf	libexec/dhcpcd-hooks	\
-	${DISTRIBDIR}/common/99-print-sysinst	libexec/dhcpcd-hooks	\
 	${.CURDIR}/etc.ttys		etc/ttys			\
 	${.CURDIR}/etc.rc		etc/rc				\
 	${.CURDIR}/install.sh		.				\
--- a/distrib/i386/installimage/spec.inst	Thu May 14 06:44:57 2015 +0000
+++ b/distrib/i386/installimage/spec.inst	Thu May 14 07:11:53 2015 +0000
@@ -1,10 +1,7 @@
-# $NetBSD: spec.inst,v 1.1 2012/01/22 03:53:30 tsutsui Exp $
+# $NetBSD: spec.inst,v 1.1.22.1 2015/05/14 07:11:53 snj Exp $
 ./mnt2			type=dir mode=0755 uname=root gname=wheel
 ./targetroot		type=dir mode=0755 uname=root gname=wheel
 
-./libexec/dhcpcd-hooks/10-resolv.conf	type=file mode=0444 uname=root gname=wheel
-./libexec/dhcpcd-hooks/99-print-sysinst	type=file mode=0444 uname=root gname=wheel
-
 ./install.sh		type=file mode=0755 uname=root gname=wheel
 ./sysinst		type=file mode=0755 uname=root gname=wheel
 ./sysinstmsgs.de	type=file mode=0444 uname=root gname=wheel
--- a/distrib/sparc64/cdroms/installcd/Makefile	Thu May 14 06:44:57 2015 +0000
+++ b/distrib/sparc64/cdroms/installcd/Makefile	Thu May 14 07:11:53 2015 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.18.2.1 2014/08/15 10:23:22 martin Exp $
+#	$NetBSD: Makefile,v 1.18.2.2 2015/05/14 07:11:53 snj Exp $
 CDBASE=		sparc64cd		# gives ${CDBASE}.iso
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
 
@@ -68,9 +68,6 @@
 CDRUNTIME+=	./usr/share/locale
 
 image_md_pre:
-	${RM} -rf cdrom/libexec/dhcpcd-hooks/*
-	${CP} ${.CURDIR}/../../../common/10-resolv.conf cdrom/libexec/dhcpcd-hooks
-	${CP} ${.CURDIR}/../../../common/99-print-sysinst cdrom/libexec/dhcpcd-hooks
 	${MKDIR} cdrom/etc
 	${HOST_LN} -fs /tmp/gettytab cdrom/etc/gettytab
 	${INSTALL} ${COPY} ${.CURDIR}/etc.ttys cdrom/etc/ttys
--- a/distrib/vax/cdroms/installcd/Makefile	Thu May 14 06:44:57 2015 +0000
+++ b/distrib/vax/cdroms/installcd/Makefile	Thu May 14 07:11:53 2015 +0000
@@ -1,4 +1,4 @@
-#	$NetBSD: Makefile,v 1.8.2.1 2014/08/15 10:23:21 martin Exp $
+#	$NetBSD: Makefile,v 1.8.2.2 2015/05/14 07:11:53 snj Exp $
 CDBASE=		vaxcd			# gives ${CDBASE}.iso
 CDRELEASE=	true			# include $RELEASEDIR/$MACHINE
 CDKERNELS=	${RELEASEDIR}/${MACHINE}/binary/kernel/netbsd-GENERIC.gz	netbsd.gz
@@ -17,10 +17,6 @@
 	${CP} ${DESTDIR}/usr/mdec/boot cdrom/boot
 	${RM} -f bootxx.${MACHINE}
 	${CP} ${DESTDIR}/usr/mdec/xxboot bootxx.${MACHINE}
-	${RM} -rf cdrom/libexec/dhcpcd-hooks/*
-	${MKDIR} -p cdrom/libexec/dhcpcd-hooks
-	${CP} ${.CURDIR}/../../../common/10-resolv.conf cdrom/libexec/dhcpcd-hooks
-	${CP} ${.CURDIR}/../../../common/99-print-sysinst cdrom/libexec/dhcpcd-hooks
 	${MKDIR} cdrom/etc
 	${HOST_LN} -fs /tmp/gettytab cdrom/etc/gettytab
 	${INSTALL} ${COPY} ${.CURDIR}/etc.ttys cdrom/etc/ttys
--- a/usr.sbin/sysinst/msg.mi.de	Thu May 14 06:44:57 2015 +0000
+++ b/usr.sbin/sysinst/msg.mi.de	Thu May 14 07:11:53 2015 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.de,v 1.2.4.2 2015/05/13 17:04:27 snj Exp $	*/
+/*	$NetBSD: msg.mi.de,v 1.2.4.3 2015/05/14 07:11:53 snj Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -547,9 +547,6 @@
 message net_mask
 {IPv4-Netzmaske}
 
-message net_namesrv6
-{IPv6-Nameserver}
-
 message net_namesrv
 {IPv4-Nameserver}
 
@@ -564,12 +561,12 @@
 
 DNS-Domain:		%s 
 Hostname:		%s 
+Nameserver:		%s 
 Netzwerkadapter:	%s 
+Verbindungstyp:		%s 
 IP-Adresse:		%s 
 Netzmaske:		%s 
-IPv4-Nameserver:	%s 
 IPv4-Gateway:		%s 
-Verbindungstyp:		%s 
 }
 
 message netok_slip
@@ -577,19 +574,18 @@
 
 DNS-Domain:		%s 
 Hostname:		%s 
+Nameserver:		%s 
 Netzwerkadapter:	%s 
+Verbindungstyp:		%s 
 IP-Adresse:		%s 
 IP-Adresse des Servers:	%s 
 Netzmaske:		%s 
-IPv4-Nameserver:	%s 
 IPv4-Gateway:		%s 
-Verbindungstyp:		%s 
 }
 
 message netokv6
 {
 IPv6-Autokonfiguration:	%s 
-IPv6-Nameserver:	%s 
 }
 
 message netok_ok
@@ -1008,8 +1004,7 @@
 message File_system {Dateisystem}
 message Select_DNS_server {  Auswählen eines DNS Servers}
 message other {andere }
-message Perform_IPv6_autoconfiguration {IPv6 automatisch konfigurieren?}
-message Perform_DHCP_autoconfiguration {Konfiguration per DHCP ermitteln?}
+message Perform_autoconfiguration {Führen Sie die automatische Konfiguration?}
 message Root_shell {Root-Shell}
 message User_shell {User-Shell}
 message Color_scheme {Farbschema}
--- a/usr.sbin/sysinst/msg.mi.en	Thu May 14 06:44:57 2015 +0000
+++ b/usr.sbin/sysinst/msg.mi.en	Thu May 14 07:11:53 2015 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.en,v 1.2.4.5 2015/05/13 17:04:27 snj Exp $	*/
+/*	$NetBSD: msg.mi.en,v 1.2.4.6 2015/05/14 07:11:53 snj Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -523,11 +523,8 @@
 message net_mask
 {IPv4 Netmask}
 
-message net_namesrv6
-{IPv6 name server}
-
 message net_namesrv
-{IPv4 name server}
+{Your name server}
 
 message net_defroute
 {IPv4 gateway}
@@ -540,12 +537,12 @@
 
 DNS Domain:		%s 
 Host Name:		%s 
+Nameserver:		%s 
 Primary Interface:	%s 
+Media type:		%s 
 Host IP:		%s 
 Netmask:		%s 
-IPv4 Nameserver:	%s 
 IPv4 Gateway:		%s 
-Media type:		%s 
 }
 
 message netok_slip
@@ -553,18 +550,17 @@
 
 DNS Domain:		%s 
 Host Name:		%s 
+Nameserver:		%s 
 Primary Interface:	%s 
+Media type:		%s 
 Host IP:		%s 
 Server IP:		%s 
 Netmask:		%s 
-IPv4 Nameserver:	%s 
 IPv4 Gateway:		%s 
-Media type:		%s 
 }
 
 message netokv6
 {IPv6 autoconf:		%s 
-IPv6 Nameserver:	%s 
 }
 
 message netok_ok
@@ -943,8 +939,7 @@
 message File_system {File system}
 message Select_DNS_server {  Select DNS server}
 message other {other }
-message Perform_IPv6_autoconfiguration {Perform IPv6 autoconfiguration?}
-message Perform_DHCP_autoconfiguration {Perform DHCP autoconfiguration?}
+message Perform_autoconfiguration {Perform autoconfiguration?}
 message Root_shell {Root shell}
 message User_shell {User shell}
 message Color_scheme {Color scheme}
--- a/usr.sbin/sysinst/msg.mi.es	Thu May 14 06:44:57 2015 +0000
+++ b/usr.sbin/sysinst/msg.mi.es	Thu May 14 07:11:53 2015 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.es,v 1.2.4.2 2015/05/13 17:04:27 snj Exp $	*/
+/*	$NetBSD: msg.mi.es,v 1.2.4.3 2015/05/14 07:11:53 snj Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -542,9 +542,6 @@
 message net_mask
 {Máscara de red IPv4}
 
-message net_namesrv6
-{Servidor de nombres IPv6}
-
 message net_namesrv
 {Servidor de nombres IPv4}
 
@@ -559,12 +556,12 @@
 
 Dominio DNS: 		%s 
 Nombre de máquina:	%s 
+Serv de nombres:	%s 
 Interfaz primaria:	%s 
+Tipo de medio:		%s 
 IP de la máquina:	%s 
 Máscara de red:		%s 
-Serv de nombres IPv4:	%s 
 Pasarela IPv4:		%s 
-Tipo de medio:		%s 
 }
 
 message netok_slip
@@ -572,18 +569,17 @@
 
 Dominio DNS: 		%s 
 Nombre de la máquina:	%s 
+Serv de nombres:	%s 
 Interfaz primaria:	%s 
+Tipo de medio:		%s 
 IP de la máquina:	%s 
 IP del servidor:	%s 
 Máscara de red:		%s 
-Serv de nombres IPv4:	%s 
 Pasarela IPv4:		%s 
-Tipo de medio:		%s 
 }
 
 message netokv6
 {IPv6 autoconf:		%s 
-Serv de nombres IPv6:	%s 
 }
 
 message netok_ok
@@ -974,8 +970,7 @@
 message File_system {Sistema de archivos}
 message Select_DNS_server {  Seleccione servidor DNS}
 message other {otro }
-message Perform_IPv6_autoconfiguration {¿Realizar autoconfiguración IPv6?}
-message Perform_DHCP_autoconfiguration {¿Realizar autoconfiguración DHCP ?}
+message Perform_autoconfiguration {¿Realizar autoconfiguración ?}
 message Root_shell {Shell de root}
 message Color_scheme {Combinación de colores}
 message White_on_black {Blanco sobre negro}
--- a/usr.sbin/sysinst/msg.mi.fr	Thu May 14 06:44:57 2015 +0000
+++ b/usr.sbin/sysinst/msg.mi.fr	Thu May 14 07:11:53 2015 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.fr,v 1.2.4.2 2015/05/13 17:04:27 snj Exp $	*/
+/*	$NetBSD: msg.mi.fr,v 1.2.4.3 2015/05/14 07:11:53 snj Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -553,9 +553,6 @@
 message net_mask
 {Votre masque de réseau (IPv4)}
 
-message net_namesrv6
-{Adresse IPv6 de votre serveur de noms (DNS)}
-
 message net_namesrv
 {Adresse IPv4 de votre serveur de noms (DNS)}
 
@@ -568,33 +565,32 @@
 message netok
 {Vous avez spécifié les valeurs suivantes :
 
-Nom de domaine (DNS) :		 %s 
-Nom d'ordinateur :		 %s 
-Interface réseau :		 %s
-Adresse IPv4 :			 %s
-Masque de sous-réseau :	 %s
-Adresse IPv4 du serveur de noms : %s
-Adresse IPv4 de la passerelle :  %s
-Type de réseau (média)	 %s 
+Nom de domaine (DNS) :		%s 
+Nom d'ordinateur :		%s 
+Adresse du serveur de noms :	%s
+Interface réseau :		%s
+Type de réseau (média)		%s 
+Adresse IPv4 :			%s
+Masque de sous-réseau :		%s
+Adresse IPv4 de la passerelle : %s
 }
 
 message netok_slip
 {Vous avez spécifié les valeurs suivantes. Êtes-vous d'accord ?
 
-Nom de domaine (DNS) :		 %s
-Nom d'ordinateur :		 %s
-Interface réseau :		 %s
-Adresse IPv4 :			 %s
-Adresse IPv4 du serveur :	 %s
-Masque de sous-réseau :	 %s
-Adresse IPv4 du serveur de noms : %s
-Adresse IPv4 de la passerelle :	 %s
-Type de réseau (média) :	 %s
+Nom de domaine (DNS) :		%s
+Nom d'ordinateur :		%s
+Adresse du serveur de noms :	%s
+Interface réseau :		%s
+Type de réseau (média) :	%s
+Adresse IPv4 :			%s
+Adresse IPv4 du serveur :	%s
+Masque de sous-réseau :		%s
+Adresse IPv4 de la passerelle :	%s
 }
 
 message netokv6
-{Auto-configuration IPv6 :	 %s 
-Adresse du serveur de noms IPv6 : %s 
+{Auto-configuration IPv6 :	%s 
 }
 
 message netok_ok
@@ -1046,8 +1042,7 @@
 message File_system {Système de fichiers}
 message Select_DNS_server {  Choisissez un serveur de noms :}
 message other {autre }
-message Perform_IPv6_autoconfiguration {Configurer automatiquement l'IPv6 ?}
-message Perform_DHCP_autoconfiguration {Configurer automatiquement par DHCP ?}
+message Perform_autoconfiguration {Configurer automatiquement ?}
 message Root_shell {Shell du compte "root"}
 message Color_scheme {Jeu de couleurs}
 message White_on_black {Blanc sur noir}
--- a/usr.sbin/sysinst/msg.mi.pl	Thu May 14 06:44:57 2015 +0000
+++ b/usr.sbin/sysinst/msg.mi.pl	Thu May 14 07:11:53 2015 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: msg.mi.pl,v 1.2.4.4 2015/05/13 17:04:27 snj Exp $	*/
+/*	$NetBSD: msg.mi.pl,v 1.2.4.5 2015/05/14 07:11:53 snj Exp $	*/
 /*	Based on english version: */
 /*	NetBSD: msg.mi.pl,v 1.36 2004/04/17 18:55:35 atatat Exp       */
 
@@ -523,9 +523,6 @@
 message net_mask
 {Maska podsieci IPv4}
 
-message net_namesrv6
-{Serwer nazw IPv6}
-
 message net_namesrv
 {Serwer nazw IPv4}
 
@@ -540,12 +537,12 @@
 
 Domena DNS:		%s 
 Nazwa hosta:		%s 
+Serwer nazw:		%s 
 Podstawowy interfejs:	%s 
+Medium sieciowe:	%s
 Twoj adres IP:		%s 
 Maska podsieci:		%s 
-Serwer nazw IPv4:	%s 
 Bramka IPv4:		%s 
-Medium sieciowe:	%s
 }
 
 message netok_slip
@@ -553,18 +550,17 @@
 
 Domena DNS:		%s 
 Nazwa hosta:		%s 
+Serwer nazw:		%s 
 Podstawowy interfejs:	%s 
+Medium sieciowe:	%s
 Twoj adres IP:		%s 
 Adres IP serwera:	%s
 Maska podsieci:		%s 
-Serwer nazw IPv4:	%s 
 Bramka IPv4:		%s 
-Medium sieciowe:	%s
 }
 
 message netokv6
 {Autkonfiguracja IPv6:	%s 
-Serwer nazw IPv6:	%s 
 }
 
 message netok_ok
@@ -946,8 +942,7 @@
 message File_system {SystemPlikow}
 message Select_DNS_server {  Wybierz serwer nazw}
 message other {inny  }
-message Perform_IPv6_autoconfiguration {Wykonac autokonfiguracje IPv6?}
-message Perform_DHCP_autoconfiguration {Wykonac autkonfiguracje DHCP?}
+message Perform_autoconfiguration {Wykonac autkonfiguracje?}
 message Root_shell {Powloka root'a}
 message Color_scheme {Kolorystyka}
 message White_on_black {Bia³y na czarnym}
--- a/usr.sbin/sysinst/net.c	Thu May 14 06:44:57 2015 +0000
+++ b/usr.sbin/sysinst/net.c	Thu May 14 07:11:53 2015 +0000
@@ -1,4 +1,4 @@
-/*	$NetBSD: net.c,v 1.2.4.3 2015/05/14 00:30:50 riz Exp $	*/
+/*	$NetBSD: net.c,v 1.2.4.4 2015/05/14 07:11:53 snj Exp $	*/
 
 /*
  * Copyright 1997 Piermont Information Systems Inc.
@@ -102,7 +102,6 @@
 #define DHCPCD "/sbin/dhcpcd"
 #include <signal.h>
 static int config_dhcp(char *);
-static void get_dhcp_value(char *, size_t, const char *);
 
 #ifdef INET6
 static int is_v6kernel (void);
@@ -494,7 +493,6 @@
 	int selected_net;
 
 	int i;
-	char dhcp_host[STRSIZE];
 #ifdef INET6
 	int v6config = 1;
 #endif
@@ -534,6 +532,7 @@
 	    return 0;
 
 	network_up = 1;
+	dhcp_config = 0;
 
 	strncpy(net_dev, net_devs[selected_net].if_dev, STRSIZE);
 
@@ -546,13 +545,10 @@
 	/* If root is on NFS do not reconfigure the interface. */
 	if (statvfs("/", &sb) == 0 && strcmp(sb.f_fstypename, "nfs") == 0) {
 		nfs_root = 1;
-		dhcp_config = 0;
 		get_ifinterface_info();
 		get_if6interface_info();
 		get_host_info();
-	} else if (slip) {
-		dhcp_config = 0;
-	} else {
+	} else if (!slip) {
 		/* Preload any defaults we can find */
 		get_ifinterface_info();
 		get_if6interface_info();
@@ -606,6 +602,8 @@
 		/* try a dhcp configuration */
 		dhcp_config = config_dhcp(net_dev);
 		if (dhcp_config) {
+			char *nline;
+
 			/* Get newly configured data off interface. */
 			get_ifinterface_info();
 			get_if6interface_info();
@@ -618,50 +616,72 @@
 			 * 'route -n show'
 			 */
 			if (collect(T_OUTPUT, &textbuf,
-				    "/sbin/route -n show | "
-				    "while read dest gateway flags;"
-				    " do [ \"$dest\" = default ] && {"
-					" echo $gateway; break; };"
-				    " done" ) > 0)
+			    "/sbin/route -n show | "
+			    "while read dest gateway flags;"
+			    " do [ \"$dest\" = default ] && {"
+			    " echo \"$gateway\"; break; };"
+			    " done" ) > 0)
 				strlcpy(net_defroute, textbuf,
 				    sizeof net_defroute);
 			free(textbuf);
+			if ((nline = strchr(net_defroute, '\n')))
+				*nline = '\0';
 
 			/* pull nameserver info out of /etc/resolv.conf */
 			if (collect(T_OUTPUT, &textbuf,
-				    "cat /etc/resolv.conf 2>/dev/null |"
-				    " while read keyword address rest;"
-				    " do [ \"$keyword\" = nameserver "
-					" -a \"${address#*:}\" = "
-					"\"${address}\" ] && {"
-					    " echo $address; break; };"
-				    " done" ) > 0)
+			    "cat /etc/resolv.conf 2>/dev/null |"
+			    " while read keyword address rest;"
+			    " do [ \"$keyword\" = nameserver ] &&"
+			    " { echo \"$address\"; break; };"
+			    " done" ) > 0)
 				strlcpy(net_namesvr, textbuf,
 				    sizeof net_namesvr);
 			free(textbuf);
+			if ((nline = strchr(net_namesvr, '\n')))
+				*nline = '\0';
 			if (net_namesvr[0] != '\0')
 				net_dhcpconf |= DHCPCONF_NAMESVR;
 
-			/* pull domainname out of leases file */
-			get_dhcp_value(net_domain, sizeof(net_domain),
-			    "domain-name");
+			/* pull domain info out of /etc/resolv.conf */
+			if (collect(T_OUTPUT, &textbuf,
+			    "cat /etc/resolv.conf 2>/dev/null |"
+			    " while read keyword domain rest;"
+			    " do [ \"$keyword\" = domain ] &&"
+			    " { echo \"$domain\"; break; };"
+			    " done" ) > 0)
+				strlcpy(net_domain, textbuf,
+				    sizeof net_domain);
+			free(textbuf);
+			if (net_domain[0] == '\0') {
+				/* pull domain info out of /etc/resolv.conf */
+				if (collect(T_OUTPUT, &textbuf,
+				    "cat /etc/resolv.conf 2>/dev/null |"
+				    " while read keyword search rest;"
+				    " do [ \"$keyword\" = search ] &&"
+				    " { echo \"$search\"; break; };"
+				    " done" ) > 0)
+					strlcpy(net_domain, textbuf,
+					    sizeof net_domain);
+				free(textbuf);
+			}
+			if ((nline = strchr(net_domain, '\n')))
+				*nline = '\0';
 			if (net_domain[0] != '\0')
 				net_dhcpconf |= DHCPCONF_DOMAIN;
 
-			/* pull hostname out of leases file */
-			dhcp_host[0] = 0;
-			get_dhcp_value(dhcp_host, sizeof(dhcp_host),
-			    "host-name");
-			if (dhcp_host[0] != '\0') {
+			if (gethostname(net_host, sizeof(net_host)) == 0 &&
+			    net_host[0] != 0)
 				net_dhcpconf |= DHCPCONF_HOST;
-				strlcpy(net_host, dhcp_host, sizeof net_host);
-			}
 		}
 	}
 
-	msg_prompt_add(MSG_net_domain, net_domain, net_domain,
-	    sizeof net_domain);
-	msg_prompt_add(MSG_net_host, net_host, net_host, sizeof net_host);
+	if (!(net_dhcpconf & DHCPCONF_HOST))
+		msg_prompt_add(MSG_net_host, net_host, net_host,
+		    sizeof net_host);
+
+	if (!(net_dhcpconf & DHCPCONF_DOMAIN))
+		msg_prompt_add(MSG_net_domain, net_domain, net_domain,
+		    sizeof net_domain);
 
 	if (!dhcp_config) {
 		/* Manually configure IPv4 */
@@ -707,24 +727,25 @@
 
 	/* confirm the setting */
 	if (slip)
-		msg_display(MSG_netok_slip, net_domain, net_host, net_dev,
-			*net_ip == '\0' ? "<none>" : net_ip,
-			*net_srv_ip == '\0' ? "<none>" : net_srv_ip,
-			*net_mask == '\0' ? "<none>" : net_mask,
-			*net_namesvr == '\0' ? "<none>" : net_namesvr,
-			*net_defroute == '\0' ? "<none>" : net_defroute,
-			*net_media == '\0' ? "<default>" : net_media);
+		msg_display(MSG_netok_slip, net_domain, net_host,
+		    *net_namesvr == '\0' ? "<none>" : net_namesvr,
+		    net_dev,
+		    *net_media == '\0' ? "<default>" : net_media,
+		    *net_ip == '\0' ? "<none>" : net_ip,
+		    *net_srv_ip == '\0' ? "<none>" : net_srv_ip,
+		    *net_mask == '\0' ? "<none>" : net_mask,
+		    *net_defroute == '\0' ? "<none>" : net_defroute);
 	else
-		msg_display(MSG_netok, net_domain, net_host, net_dev,
-			*net_ip == '\0' ? "<none>" : net_ip,
-			*net_mask == '\0' ? "<none>" : net_mask,
-			*net_namesvr == '\0' ? "<none>" : net_namesvr,
-			*net_defroute == '\0' ? "<none>" : net_defroute,
-			*net_media == '\0' ? "<default>" : net_media);
+		msg_display(MSG_netok, net_domain, net_host,
+		    *net_namesvr == '\0' ? "<none>" : net_namesvr,
+		    net_dev,
+		    *net_media == '\0' ? "<default>" : net_media,
+		    *net_ip == '\0' ? "<none>" : net_ip,
+		    *net_mask == '\0' ? "<none>" : net_mask,
+		    *net_defroute == '\0' ? "<none>" : net_defroute);
 #ifdef INET6
 	msg_display_add(MSG_netokv6,
-		     !is_v6kernel() ? "<not supported>" :
-			(v6config ? "yes" : "no"));
+		     !is_v6kernel() ? "<not supported>" : net_ip6);
 #endif
 done:
 	process_menu(MENU_yesno, deconst(MSG_netok_ok));
@@ -732,6 +753,15 @@
 	if (!yesno)
 		goto again;
 
+	run_program(0, "/sbin/ifconfig lo0 127.0.0.1");
+
+	/* dhcpcd will have configured it all for us */
+	if (dhcp_config) {
+		fflush(NULL);
+		network_up = 1;
+		return network_up;
+	}
+
 	/*
 	 * we may want to perform checks against inconsistent configuration,
 	 * like IPv4 DNS server without IPv4 configuration.
@@ -1039,7 +1069,6 @@
 mnt_net_config(void)
 {
 	char ifconfig_fn[STRSIZE];
-	char ifconfig_str[STRSIZE];
 	FILE *ifconf = NULL;
 
 	if (!network_up)
@@ -1107,11 +1136,12 @@
 		if (del_rc_conf("defaultroute") == 0)
 			add_rc_conf("defaultroute=\"%s\"\n", net_defroute);
 	} else {
-		if (snprintf(ifconfig_str, sizeof ifconfig_str,
-		    "ifconfig_%s", net_dev) > 0 &&
-		    del_rc_conf(ifconfig_str) == 0) {
-			add_rc_conf("ifconfig_%s=dhcp\n", net_dev);
-		}
+		/*
+		 * Start dhcpcd quietly and in master mode, but restrict
+		 * it to our interface
+		 */
+		add_rc_conf("dhcpcd=YES\n");
+		add_rc_conf("dhcpcd_flags=\"-qM %s\"\n", net_dev);
         }
 
 	if (ifconf)
@@ -1133,7 +1163,7 @@
 
 	if (!file_mode_match(DHCPCD, S_IFREG))
 		return 0;
-	process_menu(MENU_yesno, deconst(MSG_Perform_DHCP_autoconfiguration));
+	process_menu(MENU_yesno, deconst(MSG_Perform_autoconfiguration));
 	if (yesno) {
 		/* spawn off dhcpcd and wait for parent to exit */
 		dhcpautoconf = run_program(RUN_DISPLAY | RUN_PROGRESS,
@@ -1142,37 +1172,3 @@
 	}
 	return 0;
 }
-
-static void
-get_dhcp_value(char *targ, size_t l, const char *var)
-{
-	static const char *lease_data = "/tmp/dhcpcd-lease";
-	FILE *fp;
-	char *line;
-	size_t len, var_len;
-
-	if ((fp = fopen(lease_data, "r")) == NULL) {
-		warn("Could not open %s", lease_data);
-		*targ = '\0';
-		return;
-	}
-
-	var_len = strlen(var);
-
-	while ((line = fgetln(fp, &len)) != NULL) {
-		if (line[len - 1] == '\n')
-			--len;
-		if (len <= var_len)
-			continue;
-		if (memcmp(line, var, var_len))
-			continue;
-		if (line[var_len] != '=')
-			continue;
-		line += var_len + 1;
-		len -= var_len + 1;
-		strlcpy(targ, line, l > len ? len + 1: l);
-		break;
-	}
-
-	fclose(fp);
-}