History log of /openbsd-src/libexec/reorder_kernel/reorder_kernel.sh (Results 1 – 13 of 13)
Revision Date Author Comments
# f29e23ab 07-Nov-2022 kn <kn@openbsd.org>

Use variable and shorter logic for NFS check

No need to hardcode a parent path if we can reuse an existing variable for
the specific path that is in being used.

Negate the file system type in df(1)

Use variable and shorter logic for NFS check

No need to hardcode a parent path if we can reuse an existing variable for
the specific path that is in being used.

Negate the file system type in df(1) so the `|| exit 1' can be dropped
in favour of the errexit option, as is done for everything else in there.

Clarify the comment how this is intentionally NOT logged, i.e. the test
happens before the error trap/syslog/logfile handling.

OK millert

show more ...


# 44e1f387 07-Nov-2022 kn <kn@openbsd.org>

Set up logger(1) traps earlier to catch logfile setup failures

If /usr is mounted read-only, kernel relinking fails silently without any
log trace:

# /usr/libexec/reorder_kernel
/usr/libexec/reor

Set up logger(1) traps earlier to catch logfile setup failures

If /usr is mounted read-only, kernel relinking fails silently without any
log trace:

# /usr/libexec/reorder_kernel
/usr/libexec/reorder_kernel[35]: cannot create /usr/share/relink/kernel/GENERIC.MP/relink.log: Read-only file system

This stderr line does not show up anywhere because init(8) redirects stdout
and stderr to /dev/null, executes rc(8) which inherits it and thus executes
reorder_kernel with both streams discarded.

So install the error handler first, then try to set up a log file.

Introduce ERRMSG to provide error messages to users, i.e. not say
"see .../relink.log" when creating this file is what failed:

# ksh ./reorder_kernel.sh
./reorder_kernel.sh[40]: cannot create /usr/share/relink/kernel/GENERIC.MP/relink.log: Read-only file system
# tail -n1 /var/log/message # or xconsole(1)
Nov 7 10:51:00 eru reorder_kernel.sh: failed

OK tb

show more ...


# 2f20f629 13-May-2022 sthen <sthen@openbsd.org>

If $KERNEL_DIR.tgz exists, reorder_kernel updates the destination for
logged stdout output, but forgot to handle stderr. Fix that so that
the error log includes stderr output in that case (otherwise

If $KERNEL_DIR.tgz exists, reorder_kernel updates the destination for
logged stdout output, but forgot to handle stderr. Fix that so that
the error log includes stderr output in that case (otherwise the log
is usually empty). From Lauri Tirkkonen, plus comment adjusted. ok tb

show more ...


# ce828c77 13-Sep-2021 robert <robert@openbsd.org>

introduce /etc/bsd.re-config which can be used to configure the kernel
using config(8);

the contents of this configuration file will be fed to config(8) after
kernel relinking is done, so on the nex

introduce /etc/bsd.re-config which can be used to configure the kernel
using config(8);

the contents of this configuration file will be fed to config(8) after
kernel relinking is done, so on the next boot the new kernel will have
all the configuration changes set by the user

this comes handy if you still want to use KARL while making changes
to the GENERIC kernel

diff from Paul de Weerd with input from several developers

show more ...


# 1a49fa34 28-Sep-2019 ajacoutot <ajacoutot@openbsd.org>

Add where missing and harmonize PATH to be _PATH_DEFPATH (without local nor
X11R6).
Suggested by tb@

ok deraadt@ tb@ millert@


# 75866a61 30-Jul-2019 deraadt <deraadt@openbsd.org>

shorten the failure message, it should not wrap a line.


# b6ddd2f4 20-Jun-2019 deraadt <deraadt@openbsd.org>

after installing new kernel, do a sync(8) to encourage lazy buffers to
make it to disk (discussion with tedu)


# 1afb3ec2 10-Feb-2019 kn <kn@openbsd.org>

Simplify NFS check

Instead of getting all filesystems with df(1), filter /usr/share/ and check
with mount(1) whether it's NFS, make df error out directly if the
filesystem type matches nfs.

OK sthe

Simplify NFS check

Instead of getting all filesystems with df(1), filter /usr/share/ and check
with mount(1) whether it's NFS, make df error out directly if the
filesystem type matches nfs.

OK sthen tb

show more ...


# a3f3badc 01-May-2018 rpe <rpe@openbsd.org>

Add an explanation to relink.log what a failed checksum of /bsd
means and show how to re-enable KARL.

Prodded by and OK deraadt
Feedback and OK tb


# 8fb1a259 05-Nov-2017 rpe <rpe@openbsd.org>

Consolidate lib.so.*.a, ld.so.a and the kernel relink kit into
one location under /usr/share/relink.

Be more specific in src/etc/rc reorder_libs() what filesystems
need r/w remount and ensure that t

Consolidate lib.so.*.a, ld.so.a and the kernel relink kit into
one location under /usr/share/relink.

Be more specific in src/etc/rc reorder_libs() what filesystems
need r/w remount and ensure that their mount state is restored.

Idea and positive feedback from deraadt@
OK aja@ tb@

show more ...


# 4dd28b0e 25-Aug-2017 rpe <rpe@openbsd.org>

It's a standalone script now, so explicitly set a sane PATH.


# 9b28c7ed 25-Aug-2017 rpe <rpe@openbsd.org>

Fix detection whether /usr/share is on a nfs mounted filesystem.


# 6248d275 21-Aug-2017 rpe <rpe@openbsd.org>

Move the kernel relinking code from /etc/rc into a seperate script
/usr/libexec/reorder_kernel. Requested by ajacoutot@ to be able to
relink the kernel from within syspatch(8).

OK deraadt@ tb@