summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStuart Henderson <sthen@cvs.openbsd.org>2022-05-13 13:20:17 +0000
committerStuart Henderson <sthen@cvs.openbsd.org>2022-05-13 13:20:17 +0000
commit335345cbbdd5d1cb1712da72045e5499039aa563 (patch)
treeeea4c9966dbcb0d8d867b30bbbdc7fa46b17068a
parenteb8af16af73e2b4c4dc56a950fb92a7ff98f6848 (diff)
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
-rw-r--r--libexec/reorder_kernel/reorder_kernel.sh5
1 files changed, 3 insertions, 2 deletions
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 <rpe@openbsd.org>
#
@@ -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