<feed xmlns='http://www.w3.org/2005/Atom'>
<title>src/usr.sbin/bsdinstall/scripts/netconfig, branch main</title>
<subtitle>FreeBSD source tree</subtitle>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/'/>
<entry>
<title>bsdinstall: draw attention to new network config options</title>
<updated>2024-03-27T20:20:26+00:00</updated>
<author>
<name>Mike Karels</name>
<email>karels@FreeBSD.org</email>
</author>
<published>2024-03-27T20:10:43+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=970ea0b2cb6942b4fba088031e3b1968e056d6c9'/>
<id>970ea0b2cb6942b4fba088031e3b1968e056d6c9</id>
<content type='text'>
The network configuration options have changed in bsdinstall, with
an Auto option to proceed directly to DHCP and IPv6 autoconfig (which
is the default) as well as Manual (the old mode).  For users like me
that were used to hitting return automatically to select an interface,
but want manual configuration, attempt to call out the difference:
Change the menu caption to say "Please select a network interface
and configuration mode:" and not just an interface.

Reviewed by:	jrtc27
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The network configuration options have changed in bsdinstall, with
an Auto option to proceed directly to DHCP and IPv6 autoconfig (which
is the default) as well as Manual (the old mode).  For users like me
that were used to hitting return automatically to select an interface,
but want manual configuration, attempt to call out the difference:
Change the menu caption to say "Please select a network interface
and configuration mode:" and not just an interface.

Reviewed by:	jrtc27
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall: Add new Auto option to netconfig interface selection dialog</title>
<updated>2024-02-09T18:13:47+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2024-02-09T18:13:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c994f226bbd3c0762e3c642515fef5f9d5589493'/>
<id>c994f226bbd3c0762e3c642515fef5f9d5589493</id>
<content type='text'>
This changes the OK / Cancel buttons into Auto / Manual / Cancel, with
Auto being the default. Manual behaves like OK used to, i.e. presents a
series of dialogs asking exactly how to configure the interface, and
Cancel is unchanged, exiting with exit code 1. Auto will attempt to
configure IPv4+DHCP and IPv6+SLAAC with no interaction, failing only if
neither can be configured, thereby supporting all of IPv4-only,
IPv6-only and dual-stack environments. If at least one DNS server is
provided, it will also skip asking for DNS settings, otherwise it will
act like Manual mode for the purposes of DNS settings and prompt. For a
standard dual-stack environment this cuts down the number of netconfig
dialogs from 6 (interface, IPv4, DHCP, IPv6, SLAAC, DNS) to just the
first one.

Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D43731
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This changes the OK / Cancel buttons into Auto / Manual / Cancel, with
Auto being the default. Manual behaves like OK used to, i.e. presents a
series of dialogs asking exactly how to configure the interface, and
Cancel is unchanged, exiting with exit code 1. Auto will attempt to
configure IPv4+DHCP and IPv6+SLAAC with no interaction, failing only if
neither can be configured, thereby supporting all of IPv4-only,
IPv6-only and dual-stack environments. If at least one DNS server is
provided, it will also skip asking for DNS settings, otherwise it will
act like Manual mode for the purposes of DNS settings and prompt. For a
standard dual-stack environment this cuts down the number of netconfig
dialogs from 6 (interface, IPv4, DHCP, IPv6, SLAAC, DNS) to just the
first one.

Reviewed by:	brooks
Differential Revision:	https://reviews.freebsd.org/D43731
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall: Fix broken netconfig persistence for installed system</title>
<updated>2024-02-03T22:50:47+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2024-02-03T22:50:47+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=1e75e61d5c2c34ddaf7bfbdba02e00670f9bf231'/>
<id>1e75e61d5c2c34ddaf7bfbdba02e00670f9bf231</id>
<content type='text'>
The replacement of echo &gt;&gt; with sysrc -f used sysrc key value, which
means "read variables key and value" and thus did nothing useful (and in
fact emitted errors to the log about neither existing). Instead use the
correct sysrc key=value form so the installed system comes back up with
working networking.

Fixes:	60b37735f305 ("bsdinstall netconfig: avoid duplicate entries in rc.conf")
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The replacement of echo &gt;&gt; with sysrc -f used sysrc key value, which
means "read variables key and value" and thus did nothing useful (and in
fact emitted errors to the log about neither existing). Instead use the
correct sysrc key=value form so the installed system comes back up with
working networking.

Fixes:	60b37735f305 ("bsdinstall netconfig: avoid duplicate entries in rc.conf")
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall: Drop Error from title in netconfig no interfaces dialog</title>
<updated>2024-02-03T01:52:53+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2024-02-03T01:52:53+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=7414d14bd51d8378057bbe952c2715b9f32d1d3e'/>
<id>7414d14bd51d8378057bbe952c2715b9f32d1d3e</id>
<content type='text'>
This isn't inherently an error. It is if you're attempting to download
dist tarballs or later install packages, but a FreeBSD system with no
NIC is a reasonable setup to have, especially in a throwaway VM setting,
so we shouldn't say it is one.

Leaving the exit code as 1 is still fine, since auto will ignore it, and
avoids breaking other uses.

MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This isn't inherently an error. It is if you're attempting to download
dist tarballs or later install packages, but a FreeBSD system with no
NIC is a reasonable setup to have, especially in a throwaway VM setting,
so we shouldn't say it is one.

Leaving the exit code as 1 is still fine, since auto will ignore it, and
avoids breaking other uses.

MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall: Fix netconfig script when no interfaces are present</title>
<updated>2024-02-03T01:52:37+00:00</updated>
<author>
<name>Jessica Clarke</name>
<email>jrtc27@FreeBSD.org</email>
</author>
<published>2024-02-03T01:52:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=b809c7d6a26924ac351e49a15011da718cc3feec'/>
<id>b809c7d6a26924ac351e49a15011da718cc3feec</id>
<content type='text'>
The script uses [ -z "$INTERFACES" ] to check if the list of interfaces
is empty and will exit early if so, but INTERFACES always contains at
least a space due to the way it appends the list of wireless devices.
Fix this by only adding the space when there are devices to append,
mirroring the behaviour for non-wireless devices above (both will result
in a redundant leading space when the list is non-empty, but that one is
harmless).

Fixes:		159ca5c844cd ("Adapt to new wireless scheme where base wlan interfaces do not show up in ifconfig anymore.")
MFC after:	1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The script uses [ -z "$INTERFACES" ] to check if the list of interfaces
is empty and will exit early if so, but INTERFACES always contains at
least a space due to the way it appends the list of wireless devices.
Fix this by only adding the space when there are devices to append,
mirroring the behaviour for non-wireless devices above (both will result
in a redundant leading space when the list is non-empty, but that one is
harmless).

Fixes:		159ca5c844cd ("Adapt to new wireless scheme where base wlan interfaces do not show up in ifconfig anymore.")
MFC after:	1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall netconfig: avoid duplicate entries in rc.conf</title>
<updated>2023-10-13T16:45:54+00:00</updated>
<author>
<name>Pierre Pronchery</name>
<email>pierre@freebsdfoundation.org</email>
</author>
<published>2023-10-13T15:45:19+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=60b37735f305e72e67695ead029e59ea29b2bc29'/>
<id>60b37735f305e72e67695ead029e59ea29b2bc29</id>
<content type='text'>
This uses sysrc to write and update configuration variables in the
temporary configuration file for network access, ._rc.conf.net. This
replaces the previous mechanism, which was simply appending new values
as they were updated.

PR:		212396
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42194
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This uses sysrc to write and update configuration variables in the
temporary configuration file for network access, ._rc.conf.net. This
replaces the previous mechanism, which was simply appending new values
as they were updated.

PR:		212396
Reviewed by:	emaste
Sponsored by:	The FreeBSD Foundation
Differential Revision: https://reviews.freebsd.org/D42194
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall: avoid conflicts with fd 3</title>
<updated>2023-09-21T06:41:48+00:00</updated>
<author>
<name>Lars Kellogg-Stedman</name>
<email>lars@oddbit.com</email>
</author>
<published>2023-08-15T15:44:02+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=c0e249d32c780ee8240fe8b3b8144078a8eec41f'/>
<id>c0e249d32c780ee8240fe8b3b8144078a8eec41f</id>
<content type='text'>
Throughout the bsdinstall script fd 3 is used by f_dprintf (set through
$TERMINAL_STDOUT_PASSTHRU). In several places in the bsdinstalls scripts,
we use fd 3 to juggle stdout when calling out to other tools, which can
cause the installer to fail with a "Bad file descriptor" error when
f_dprintf attempts to use it.

This commit replaces all constructs like this:

    exec 3&gt;&amp;1
    SOME_VARIABLE=$(some command 2&gt;&amp;1 1&gt;&amp;3)
    exec 3&gt;&amp;-

With:

    exec 5&gt;&amp;1
    SOME_VARIABLE=$(some command 2&gt;&amp;1 1&gt;&amp;5)
    exec 5&gt;&amp;-

PR:			273148
Reviewed by:		corvink
Fixes:			1f7746d81f53447ac15cc99395bb714d4dd0a4da ("bsdinstall: stop messing with file descriptors")
MFC after:		1 week
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Throughout the bsdinstall script fd 3 is used by f_dprintf (set through
$TERMINAL_STDOUT_PASSTHRU). In several places in the bsdinstalls scripts,
we use fd 3 to juggle stdout when calling out to other tools, which can
cause the installer to fail with a "Bad file descriptor" error when
f_dprintf attempts to use it.

This commit replaces all constructs like this:

    exec 3&gt;&amp;1
    SOME_VARIABLE=$(some command 2&gt;&amp;1 1&gt;&amp;3)
    exec 3&gt;&amp;-

With:

    exec 5&gt;&amp;1
    SOME_VARIABLE=$(some command 2&gt;&amp;1 1&gt;&amp;5)
    exec 5&gt;&amp;-

PR:			273148
Reviewed by:		corvink
Fixes:			1f7746d81f53447ac15cc99395bb714d4dd0a4da ("bsdinstall: stop messing with file descriptors")
MFC after:		1 week
</pre>
</div>
</content>
</entry>
<entry>
<title>Remove $FreeBSD$: one-line sh pattern</title>
<updated>2023-08-16T17:55:03+00:00</updated>
<author>
<name>Warner Losh</name>
<email>imp@FreeBSD.org</email>
</author>
<published>2023-08-16T17:55:03+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf'/>
<id>d0b2dbfa0ecf2bbc9709efc5e20baf8e4b44bbbf</id>
<content type='text'>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall: allow whitelabeling the scripts</title>
<updated>2022-05-24T15:49:06+00:00</updated>
<author>
<name>Brad Davis</name>
<email>brd@FreeBSD.org</email>
</author>
<published>2022-05-24T15:49:06+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=cc42ef5328963ee55c3305b136e9a86145f24594'/>
<id>cc42ef5328963ee55c3305b136e9a86145f24594</id>
<content type='text'>
Approved by:		allanjude, asiciliano
Differential Revision:	https://reviews.freebsd.org/D35197
Sponsored by:		Rubicon Communications, LLC ("Netgate")
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Approved by:		allanjude, asiciliano
Differential Revision:	https://reviews.freebsd.org/D35197
Sponsored by:		Rubicon Communications, LLC ("Netgate")
</pre>
</div>
</content>
</entry>
<entry>
<title>bsdinstall netconfig: Replace dialog(1) with bsddialog(1)</title>
<updated>2022-04-02T19:33:40+00:00</updated>
<author>
<name>Alfonso S. Siciliano</name>
<email>asiciliano@FreeBSD.org</email>
</author>
<published>2022-04-02T19:29:37+00:00</published>
<link rel='alternate' type='text/html' href='http://cgit.freebsd.org/src/commit/?id=6833ac673d98275ef72a8873372714011c73eb15'/>
<id>6833ac673d98275ef72a8873372714011c73eb15</id>
<content type='text'>
Replace (LGPL) dialog(1) with (BSD-2-Clause) bsddialog(1).

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34682
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Replace (LGPL) dialog(1) with (BSD-2-Clause) bsddialog(1).

Approved by:		bapt (mentor)
Differential Revision:	https://reviews.freebsd.org/D34682
</pre>
</div>
</content>
</entry>
</feed>
