From: sthen Date: Fri, 13 May 2022 13:20:16 +0000 (+0000) Subject: If $KERNEL_DIR.tgz exists, reorder_kernel updates the destination for X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=2f20f629b160bf72d314c538927edc485e6df416;p=openbsd 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 --- diff --git a/libexec/reorder_kernel/reorder_kernel.sh b/libexec/reorder_kernel/reorder_kernel.sh index ded689f095e..957c85b9102 100644 --- a/libexec/reorder_kernel/reorder_kernel.sh +++ b/libexec/reorder_kernel/reorder_kernel.sh @@ -1,6 +1,6 @@ #!/bin/ksh # -# $OpenBSD: reorder_kernel.sh,v 1.10 2021/09/13 11:49:21 robert Exp $ +# $OpenBSD: reorder_kernel.sh,v 1.11 2022/05/13 13:20:16 sthen Exp $ # # Copyright (c) 2017 Robert Peichaer # @@ -43,8 +43,9 @@ trap 'logger -t $PROGNAME "kernel relinking done"' EXIT if [[ -f $KERNEL_DIR.tgz ]]; then rm -rf $KERNEL_DIR/$KERNEL/* # The directory containing the logfile was just deleted, redirect - # stdout again to a new logfile. + # stdout/stderr again to a new logfile. exec 1>$LOGFILE + exec 2>&1 tar -C $KERNEL_DIR -xzf $KERNEL_DIR.tgz $KERNEL rm -f $KERNEL_DIR.tgz fi