Use variable and shorter logic for NFS checkNo need to hardcode a parent path if we can reuse an existing variable forthe specific path that is in being used.Negate the file system type in df(1)
Use variable and shorter logic for NFS checkNo need to hardcode a parent path if we can reuse an existing variable forthe specific path that is in being used.Negate the file system type in df(1) so the `|| exit 1' can be droppedin 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 testhappens before the error trap/syslog/logfile handling.OK millert
show more ...
Set up logger(1) traps earlier to catch logfile setup failuresIf /usr is mounted read-only, kernel relinking fails silently without anylog trace: # /usr/libexec/reorder_kernel /usr/libexec/reor
Set up logger(1) traps earlier to catch logfile setup failuresIf /usr is mounted read-only, kernel relinking fails silently without anylog trace: # /usr/libexec/reorder_kernel /usr/libexec/reorder_kernel[35]: cannot create /usr/share/relink/kernel/GENERIC.MP/relink.log: Read-only file systemThis stderr line does not show up anywhere because init(8) redirects stdoutand stderr to /dev/null, executes rc(8) which inherits it and thus executesreorder_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: failedOK tb
If $KERNEL_DIR.tgz exists, reorder_kernel updates the destination forlogged stdout output, but forgot to handle stderr. Fix that so thatthe error log includes stderr output in that case (otherwise
If $KERNEL_DIR.tgz exists, reorder_kernel updates the destination forlogged stdout output, but forgot to handle stderr. Fix that so thatthe error log includes stderr output in that case (otherwise the logis usually empty). From Lauri Tirkkonen, plus comment adjusted. ok tb
various formatting fixes;
introduce /etc/bsd.re-config which can be used to configure the kernelusing config(8);the contents of this configuration file will be fed to config(8) afterkernel relinking is done, so on the nex
introduce /etc/bsd.re-config which can be used to configure the kernelusing config(8);the contents of this configuration file will be fed to config(8) afterkernel relinking is done, so on the next boot the new kernel will haveall the configuration changes set by the userthis comes handy if you still want to use KARL while making changesto the GENERIC kerneldiff from Paul de Weerd with input from several developers
Add where missing and harmonize PATH to be _PATH_DEFPATH (without local norX11R6).Suggested by tb@ok deraadt@ tb@ millert@
shorten the failure message, it should not wrap a line.
after installing new kernel, do a sync(8) to encourage lazy buffers tomake it to disk (discussion with tedu)
Simplify NFS checkInstead of getting all filesystems with df(1), filter /usr/share/ and checkwith mount(1) whether it's NFS, make df error out directly if thefilesystem type matches nfs.OK sthe
Simplify NFS checkInstead of getting all filesystems with df(1), filter /usr/share/ and checkwith mount(1) whether it's NFS, make df error out directly if thefilesystem type matches nfs.OK sthen tb
Add an explanation to relink.log what a failed checksum of /bsdmeans and show how to re-enable KARL.Prodded by and OK deraadtFeedback and OK tb
Consolidate lib.so.*.a, ld.so.a and the kernel relink kit intoone location under /usr/share/relink.Be more specific in src/etc/rc reorder_libs() what filesystemsneed r/w remount and ensure that t
Consolidate lib.so.*.a, ld.so.a and the kernel relink kit intoone location under /usr/share/relink.Be more specific in src/etc/rc reorder_libs() what filesystemsneed r/w remount and ensure that their mount state is restored.Idea and positive feedback from deraadt@OK aja@ tb@
It's a standalone script now, so explicitly set a sane PATH.
Fix detection whether /usr/share is on a nfs mounted filesystem.
Move the kernel relinking code from /etc/rc into a seperate script/usr/libexec/reorder_kernel. Requested by ajacoutot@ to be able torelink the kernel from within syspatch(8).OK deraadt@ tb@