Age | Commit message (Collapse) | Author |
|
|
|
This modifies the installer question, auto install scripts may need updating.
Allows answering ? to the interface question to list allowed lladdrs
and allows answering with one of them to configure the interface.
Reconfiguring by either name/unit or lladdr will clear the previous config.
Many suggestions from kn@
finish it @deraadt
|
|
|
|
|
|
|
|
When needed, lladdr is more precise and enduring.
Suggested by deraadt@
Many improvments and OK kn@
|
|
|
|
|
|
Original implementation by martijn@
Feedback and suggestions from kn@, sthen@, claudio@, florian@, and deraadt@.
ok deraadt
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
((Lenovo in particular) firmware updating methods do the same -- placing
a payload in there, so a small space won't do.
ok kettenis
|
|
|
|
|
|
|
|
|
|
|
|
Upgrades are noiser on macppc (and loongson and octeon) than on other
architectures because boot firmware changes and/or tips to complete an
OpenBSD installation are always printed, even though they are not needed
after an upgrade.
OK deraadt
|
|
|
|
bsd.rd and miniroot72.img fit, boot and install over NFS with this.
OK deraadt
|
|
clockintr(9) is a machine-independent clock interrupt scheduler. It
emulates most of what the machine-dependent clock interrupt code is
doing on every platform. Every CPU has a work schedule based on the
system uptime clock. For now, every CPU has a hardclock(9) and a
statclock(). If schedhz is set, every CPU has a schedclock(), too.
This commit only contains the MI pieces. All code is conditionally
compiled with __HAVE_CLOCKINTR. This commit changes no behavior yet.
At a high level, clockintr(9) is configured and used as follows:
1. During boot, the primary CPU calls clockintr_init(9). Global state
is initialized.
2. Primary CPU calls clockintr_cpu_init(9). Local, per-CPU state is
initialized. An "intrclock" struct may be installed, too.
3. Secondary CPUs call clockintr_cpu_init(9) to initialize their
local state.
4. All CPUs repeatedly call clockintr_dispatch(9) from the MD clock
interrupt handler. The CPUs complete work and rearm their local
interrupt clock, if any, during the dispatch.
5. Repeat step (4) until the system shuts down, suspends, or hibernates.
6. During resume, the primary CPU calls inittodr(9) and advances the
system uptime.
7. Go to step (2). This time around, clockintr_cpu_init(9) also
advances the work schedule on the calling CPU to skip events that
expired during suspend. This prevents a "thundering herd" of
useless work during the first clock interrupt.
In the long term, we need an MI clock interrupt scheduler in order to
(1) provide control over the clock interrupt to MI subsystems like
timeout(9) and dt(4) to improve their accuracy, (2) provide drivers
like acpicpu(4) a means for slowing or stopping the clock interrupt on
idle CPUs to conserve power, and (3) reduce the amount of duplicated
code in the MD clock interrupt code.
Before we can do any of that, though, we need to switch every platform
over to using clockintr(9) and do some cleanup.
Prompted by "the vmm(4) time bug," among other problems, and a
discussion at a2k19 on the subject. Lots of design input from
kettenis@. Early versions reviewed by kettenis@ and mlarkin@.
Platform-specific help and testing from kettenis@, gkoehler@,
mlarkin@, miod@, aoyama@, visa@, and dv@. Babysitting and spiritual
guidance from mlarkin@ and kettenis@.
Link: https://marc.info/?l=openbsd-tech&m=166697497302283&w=2
ok kettenis@ mlarkin@
|
|
From Miguel Landaeta
|
|
|
|
|
|
|
|
Other function, same stuff like r1.1210 except here there `>/dev/null 2>&1'
hammer is required to silence the ls(1) test.
The make_dev() call is no longer silenced now but does not print on stdout
anyway; if making the device fails we'd like to know.
Otherwise if probing the disk fails it continues to be silenced.
(cvs diff -w -U1)
|@@ -2311,3 +2311,2 @@ is_rootdisk() {
|
|- (
| make_dev $_d
|@@ -2322,6 +2321,6 @@ is_rootdisk() {
| umount /mnt
|- fi
|+ fi >/dev/null 2>&1
| rm -f /dev/{r,}$_d?
|+
| return $_rc
|- ) >/dev/null 2>&1
| }
OK halex
|
|
When upgrading to releases, the installer fills rc.firsttime(8) with
a syspatch(8) snippet possibly displaying available patches.
That snippet itself checks for a release version as well as an existent
installurl(5) file as a precondition for syspatch, see the diff below.
syspatch, however, has code to fallback to cdn.o.o without a valid URL:
286 _MIRROR=$(while read _line; do _line=${_line%%#*}; [[ -n ${_line} ]] &&
287 print -r -- "${_line}"; done </etc/installurl | tail -1) 2>/dev/null
288 [[ ${_MIRROR} == @(file|ftp|http|https)://* ]] ||
289 _MIRROR=https://cdn.openbsd.org/pub/OpenBSD
290 _MIRROR="${_MIRROR}/syspatch/${_KERNV[0]}/$(machine)"
Furthermore, the installer actively sets a working URL if needed, in the
same finish_up() function shortly before placing the syspatch snippet:
2842 # Create /etc/installurl if it does not yet exist.
2843 if [[ ! -f /mnt/etc/installurl ]]; then
2844 echo "${INSTALL_URL:-https://cdn.openbsd.org/pub/OpenBSD}" \
2845 >/mnt/etc/installurl
2846 fi
So one of the following is true for installurl:
1. exists but has no valid URL, then syspatch falls back to cdn.o.o
2. exists and has a valid URL, then syspatch uses that
3. does not exist so the installer creates it with cdn.o.o, see 2.
In the unlikely case that the install/upgrade finishes, i.e. installurl
does exist, but gets removed or truncated before rc.firsttime runs, the
existing check would actually prevent syspatch from running even though
it copes with such files.
So just remove the useless check.
OK aja
|
|
|
|
We should be fine silencing only the test condition which produces legit
output and warnings.
All else produces no output and should not error out; if it does, those
warnings should be printed and fixed.
Feedback OK halex
|
|
|
|
|
|
This function's style is a bit off: it wraps the body in a subshell to
discard all stdout/err at once, but still uses return inside it.
1. A command list (using {}) would be enough here as it groups like a
subshell but avoids spawning another shell;
2. discarding stdout/err at the end of an if block works the same
(effecting both condition and body) and saves one level of indent;
3. return inside a subshell inside a function does NOT return from the
function but merely exits the subshell; this is easily misread.
Saving a fork and indent and improving readability boils down to this
(cvs diff -wU1):
|@@ -3320,3 +3317,2 @@ check_unattendedupgrade() {
| _d=${_d%% *}
|- (
| if [[ -n $_d ]]; then
|@@ -3331,5 +3327,5 @@ check_unattendedupgrade() {
| rm -f /dev/{r,}$_d?
|- fi
|+ fi >/dev/null 2>&1
|+
| return $_rc
|- ) > /dev/null 2>&1
| }
OK halex
|
|
On supported -release systems, syspatch(8) -c is run from rc.firsttime(8)
and the list of patches it pretty-printed if non-empty.
-c output fits into a shell variable, not needing a temporary file, which
is also what usr.sbin/syspatch/syspatch.sh does internally.
OK millert
|
|
sh(1) happily accepts newlines inside double quotes just like in scripts:
$ sh -c "echo foo
echo bar"
foo
bar
So no need to squash things into a single line as usually done inside make
targets where each makefile line is considered its own script unless
continued with trailing backslashes.
OK millert
|
|
|
|
The delimiter can be quoted (single or double) to disable parameter, command
and arithmetic expansion inside the here document:
$ cat <<__EOT
echo $(echo foo)
__EOT
echo foo
$ cat <<'__EOT'
echo $(echo foo)
__EOT
echo $(echo foo)
Do the latter to be able to write the here document/file content exactly as
it would end up in output/rc.firsttime, making it easier to read.
To be more consistent and explicit, switch the remaining here documents with
pure plain text (no shell expansion, etc.) to quoted delimiters.
OK millert
|
|
We read /tmp/i/hosts line-wise to fill /mnt/etc/hosts and remove the tmp
file immediately afterwards, so just skip ftplist entries inside the loop
with a slightly easier to read ksh pattern rather than purge the tmp file
up-front with sed(1).
This is also a tiny bit more robust should the ftplist entries ever be added
with a tab as separator instead of a space and/or an alias since the sed
one-liner hardcodes a single space and expects no alias whereas ksh's read
takes any amount of whitespace between _addr and _hn while not caring about
optional aliases.
Comment is obvious so zap it.
OK millert
|
|
model there might be no firmware and we want to avoid confusing users
with WARNING messages about patterns that were not matched.
ok deraadt@
|
|
to use a time zone path that's not relative to /usr/share/zoneinfo.
Hopefully we can limit tzset(3) to only look at zone info files in
/usr/share/zoneinfo, soon.
OK millert, deraadt
|
|
ok miod@ deraadt@
|
|
|
|
|
|
|