From 5a97c527f44a0a663f71fa61a022402e856ee94d Mon Sep 17 00:00:00 2001 From: Rodrigo Arias Mallo Date: Fri, 30 Aug 2024 18:17:41 +0200 Subject: [PATCH] Don't redirect stage2 output --- stage-2-init.sh | 30 +++++++++++++++--------------- 1 file changed, 15 insertions(+), 15 deletions(-) diff --git a/stage-2-init.sh b/stage-2-init.sh index 5a44539..c496adf 100755 --- a/stage-2-init.sh +++ b/stage-2-init.sh @@ -91,19 +91,19 @@ if [ "${IN_NIXOS_SYSTEMD_STAGE1:-}" != true ]; then fi - # Log the script output to /dev/kmsg or /run/log/stage-2-init.log. - # Only at this point are all the necessary prerequisites ready for these commands. - exec {logOutFd}>&1 {logErrFd}>&2 - if test -w /dev/kmsg; then - exec > >(tee -i /proc/self/fd/"$logOutFd" | while read -r line; do - if test -n "$line"; then - echo "<7>stage-2-init: $line" > /dev/kmsg - fi - done) 2>&1 - else - mkdir -p /run/log - exec > >(tee -i /run/log/stage-2-init.log) 2>&1 - fi +# # Log the script output to /dev/kmsg or /run/log/stage-2-init.log. +# # Only at this point are all the necessary prerequisites ready for these commands. +# exec {logOutFd}>&1 {logErrFd}>&2 +# if test -w /dev/kmsg; then +# exec > >(tee -i /proc/self/fd/"$logOutFd" | while read -r line; do +# if test -n "$line"; then +# echo "<7>stage-2-init: $line" > /dev/kmsg +# fi +# done) 2>&1 +# else +# mkdir -p /run/log +# exec > >(tee -i /run/log/stage-2-init.log) 2>&1 +# fi fi @@ -142,8 +142,8 @@ ln -sfn "$systemConfig" /run/booted-system # especially no need to start systemd if [ "${IN_NIXOS_SYSTEMD_STAGE1:-}" != true ]; then # Reset the logging file descriptors. - exec 1>&$logOutFd 2>&$logErrFd - exec {logOutFd}>&- {logErrFd}>&- + #exec 1>&$logOutFd 2>&$logErrFd + #exec {logOutFd}>&- {logErrFd}>&- # Start systemd in a clean environment.