bsdinstall: restore the environment when restarting
It is possible to restart the installation process upon errors, when
installing normally through the `auto` script, or when installing a jail
with the `jail` script. However, some values obtained interactively from
the user or guessed by some scripts were kept in the environment when
restarting the process; this made it impossible to re-run some steps as
expected after the restart.
For instance, if a bad choice of mirror was made in the `mirrorselect`
phase, restarting the installer remembered the choice made, and would
never prompt for a different one again. Rebooting was then the only easy
way out of this situation.
This change restores a pre-defined list of environment variables when
restarting the installation process.
PR: 266987
Reviewed by: emaste
[3 lines not shown]
ifconfig: reject netmask and broadcast for inet6
We don't support setting netmask or broadcast address for INET6
addresses, and trying to do crashes ifconfig. Handle this the
same way as af_link, by rejecting attempts to configure these
parameters.
PR: 286910
Reported by: Hayzam Sherif <hayzam at alchemilla.io>
MFC after: 3 days
Reviewed by: zlei, kevans, des, cy
Approved by: kevans (mentor)
Differential Revision: https://reviews.freebsd.org/D50413
(cherry picked from commit 59ee9260e6bbcc3b5654126eed6e9490315c81f1)
ifconfig tests: remove incorrect #!
Fixes: 59ee9260e6bb ("ifconfig: reject netmask and broadcast for inet6")
[5 lines not shown]
bridge: check allow_llz_overlap before member_ifaddrs
When adding a new interface to a bridge and allow_llz_overlap=0, which
is the default value, if_bridge checks if the interface has IPv6 link
local addresses assigned, and if it does, it calls in6_ifdetach() to
remove all IPv6 addresses from the interface.
This means it was possible to do this:
% ifconfig bridge1 create inet6 -ifdisabled auto_linklocal up
% ifconfig epair20 create inet6 -ifdisabled auto_linklocal up
% ifconfig bridge1 addm epair20a
... with the result that the link-local address on epair20a would be
removed, then the interface would be added to the bridge.
If member_ifaddrs=0, which is also the default value, this no longer
works:
[17 lines not shown]
rc.subr: remove the dependency on bsdconfig
rc.subr uses sysrc(8) for the 'enable' and 'disable' commands, which
means the entire rc(8) stack depends on bsdconfig. Instead, provide a
minimal amount of rc.conf-editing functionality in rc.subr and use it to
implement these commands.
Reviewed by: des, bapt
Approved by: des (mentor)
Differential Revision: https://reviews.freebsd.org/D50325
(cherry picked from commit f6328f052518d56c01f10e14cd9ef1f2675c01a4)
pkg/FreeBSD.conf: Fix comments to reflect -kmods
Now that this file lists two repositories, the text "to disable *this*
repository" no longer makes sense. Also, expand the example to list
how to disable both FreeBSD and FreeBSD-kmods repositories.
Reported by: Graham Perrin
MFC after: 3 days
(cherry picked from commit 955ab1a8f21ec1a662a87fc5e76e6d5690e09085)
Provide user interface to retrieve reported extended errors
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D50483
sysconf(3): add _SC_UEXTERR_LEN, the max length of the extended error string
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D50483
vm/vm_mmap.c: add two examples of using exterrors
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D50483
kernel: copyout extended errors to userspace and add exterrctl(2) to control it
Reviewed by: brooks
Sponsored by: The FreeBSD Foundation
MFC after: 2 weeks
Differential revision: https://reviews.freebsd.org/D50483
sound: Deprecate the MIDI sequencer
The in-kernel MIDI sequencer is not used anymore, since this is done by
userland applications nowadays. It also contains bugs, and we are not
exactly sure how it works, or if it worked properly in the first place.
Sponsored by: The FreeBSD Foundation
MFC after: 1 day
Reviewed by: emaste
Differential Revision: https://reviews.freebsd.org/D50606
(cherry picked from commit 799105f53a9647f86dbf08456260d5850851b6f9)
vm_page: use lookup_ge in grab_valid_iter()
To improve performance slightly, use vm_radix_iter_lookup_ge to skip
over several missing pages at once in grab_valid_iter().
Fix a case in which the function could return with the iterator
argument not reset after a lock release/reacquire.
Reviewed by: alc, markj
Differential Revision: https://reviews.freebsd.org/D50601
cp: Improve to_root test case.
Since the bug we're testing involved path name construction, we don't
need to be root to test it; we can simply check the error message.
Fixes: 537fbf70f12b
Sponsored by: Klara, Inc.
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D50628
netcat: Allow service names to be used.
Someone should really do a vendor import, but it's non-trivial, as we
have local modifications. In the meantime, here's a nine-year-old
upstream patch which allows service names to be used instead of port
numbers.
MFC after: 1 week
Obtained from: OpenBSD
Reviewed by: allanjude
Differential Revision: https://reviews.freebsd.org/D50348
vm_pageout: fix pageout_flush
A change just made to vm_pageout_flush wrongly dismissed the variable
'runlen' and used 'count' in its place, with the unintended
consequence of terminating the main loop of the function prematurely
when the first VM_PAGER_AGAIN pageout status was encountered.
Reintroduce that variable, so that the loop runs to completion.
Reported by: alc
Reviewed by: alc
Fixes: f2a193a967e3 ("vm_pageout: reduce number of flush() params")
Differential Revision: https://reviews.freebsd.org/D50622