aboutsummaryrefslogtreecommitdiff
path: root/usr.sbin/bsdinstall/scripts/netconfig
Commit message (Collapse)AuthorAgeFilesLines
* bsdinstall: draw attention to new network config optionsMike Karels2024-03-271-1/+1
| | | | | | | | | | | | 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
* bsdinstall: Add new Auto option to netconfig interface selection dialogJessica Clarke2024-02-091-18/+59
| | | | | | | | | | | | | | | | | | 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
* bsdinstall: Fix broken netconfig persistence for installed systemJessica Clarke2024-02-031-2/+2
| | | | | | | | | | The replacement of echo >> 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")
* bsdinstall: Drop Error from title in netconfig no interfaces dialogJessica Clarke2024-02-031-1/+1
| | | | | | | | | | | | 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
* bsdinstall: Fix netconfig script when no interfaces are presentJessica Clarke2024-02-031-1/+2
| | | | | | | | | | | | | 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
* bsdinstall netconfig: avoid duplicate entries in rc.confPierre Pronchery2023-10-131-2/+2
| | | | | | | | | | | | 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
* bsdinstall: avoid conflicts with fd 3Lars Kellogg-Stedman2023-09-211-6/+6
| | | | | | | | | | | | | | | | | | | | | | | | | 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>&1 SOME_VARIABLE=$(some command 2>&1 1>&3) exec 3>&- With: exec 5>&1 SOME_VARIABLE=$(some command 2>&1 1>&5) exec 5>&- PR: 273148 Reviewed by: corvink Fixes: 1f7746d81f53447ac15cc99395bb714d4dd0a4da ("bsdinstall: stop messing with file descriptors") MFC after: 1 week
* Remove $FreeBSD$: one-line sh patternWarner Losh2023-08-161-1/+0
| | | | Remove /^\s*#[#!]?\s*\$FreeBSD\$.*$\n/
* bsdinstall: allow whitelabeling the scriptsBrad Davis2022-05-241-5/+8
| | | | | | Approved by: allanjude, asiciliano Differential Revision: https://reviews.freebsd.org/D35197 Sponsored by: Rubicon Communications, LLC ("Netgate")
* bsdinstall netconfig: Replace dialog(1) with bsddialog(1)Alfonso S. Siciliano2022-04-021-31/+31
| | | | | | | Replace (LGPL) dialog(1) with (BSD-2-Clause) bsddialog(1). Approved by: bapt (mentor) Differential Revision: https://reviews.freebsd.org/D34682
* Adapt to new wireless scheme where base wlan interfaces do not show up inNathan Whitehorn2015-12-061-8/+13
| | | | | | | ifconfig anymore. Notes: svn path=/head/; revision=291877
* Incorporate PR bin/161547 to detect when an interface is wireless.Devin Teske2013-10-111-3/+9
| | | | | | | | | | | | Patch from PR modified slightly for whitespace and style. PR: bin/161547 Submitted by: Warren Block <wblock@wonkity.com> Reviewed by: Allan Jude <freebsd@allanjude.com> Approved by: re (glebius) Notes: svn path=/head/; revision=256347
* Provide an error message and error handling if there are no networkNathan Whitehorn2011-10-251-0/+7
| | | | | | | | | | | interfaces in the system. This is a non-fatal error except when doing a network installation. PR: bin/161950 MFC after: 3 days Notes: svn path=/head/; revision=226741
* Correct a typo.Bjoern A. Zeeb2011-09-071-1/+1
| | | | | | | | | Submitted by: gcooper Reviewed by: nwhitehorn Approved by: re (kib) Notes: svn path=/head/; revision=225430
* Fix resolv.conf search list creation:Bjoern A. Zeeb2011-06-041-3/+7
| | | | | | | | | | | 1) do not print out an empty "search ", things do not like it. 2) the search list is not comma separated. Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems Notes: svn path=/head/; revision=222681
* Write the multi step netconfig to a temporary file and only move thatBjoern A. Zeeb2011-06-021-3/+4
| | | | | | | | | | | | | to the final name if netconfig was completely finished. This fixes reentrance problems even better than r222611. Suggested by: nwhitehorn Reviewed by: nwhitehorn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems Notes: svn path=/head/; revision=222619
* Empty the network configuration only after the user decided to pick anBjoern A. Zeeb2011-06-021-2/+2
| | | | | | | | | | | | | interface. Otherwise an accidental start of the netowrk configuration and immediate cancel after the install has finished removes the previously configured settings. Discussed with: nwhitehorn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems Notes: svn path=/head/; revision=222611
* Split netconfig into three parts:Bjoern A. Zeeb2011-05-291-42/+115
| | | | | | | | | | | | | | | | | | - netconfig - what auto will call which in turn will check for IPv4 and IPv6 to be available and ask the user to configure it by calling - netconfig_ipv4 doing DHCP and static IPv4 addresses, and - netconfig_ipv6 doing rtsol and static IPv6 addresses, and then checking, querying and updating resolv.conf upon return. Both DHCP and rtsol (in the future) might update resolv.conf already so we seed ourselves from that file if available. Reviewed by: nwhitehorn Sponsored by: The FreeBSD Foundation Sponsored by: iXsystems Notes: svn path=/head/; revision=222468
* Import bsdinstall. This is meant to be (eventually in conjunction withNathan Whitehorn2011-02-181-0/+121
pc-sysinstall) a replacement for sysinstall in the 9.0 release and beyond. Currently supported platforms are sparc64, pc98, i386, amd64, powerpc, and powerpc64. Integration into the build system will occur in the coming weeks. Merging with pc-sysinstall will use this code as a frontend, while temporarily retaining the interactive partition editor here. This work will be done in parallel with improvements on this code and release integration. Thanks to all who have provided testing and comments! Notes: svn path=/head/; revision=218799