From 273c9e72c1a578915cc4db6a83ca5e0f6a1771f4 Mon Sep 17 00:00:00 2001 From: Rob Landley Date: Mon, 19 Oct 2020 18:04:39 -0500 Subject: Do an "exec >/dev/console 2>&1" early in mkroot init so we have debug output if anything later in the script fails. --- scripts/mkroot.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'scripts') diff --git a/scripts/mkroot.sh b/scripts/mkroot.sh index 040f7c60..431e0d89 100755 --- a/scripts/mkroot.sh +++ b/scripts/mkroot.sh @@ -74,16 +74,17 @@ cat > "$ROOT"/init << 'EOF' && export HOME=/home PATH=/bin:/sbin -mountpoint -q proc || mount -t proc proc proc -mountpoint -q sys || mount -t sysfs sys sys if ! mountpoint -q dev; then mount -t devtmpfs dev dev || mdev -s + [ $$ -eq 1 ] && exec >/dev/console 2>&1 for i in ,fd /0,stdin /1,stdout /2,stderr do ln -sf /proc/self/fd${i/,*/} dev/${i/*,/}; done mkdir -p dev/{shm,pts} mountpoint -q dev/pts || mount -t devpts dev/pts dev/pts chmod +t /dev/shm fi +mountpoint -q proc || mount -t proc proc proc +mountpoint -q sys || mount -t sysfs sys sys if [ $$ -eq 1 ]; then # Setup networking for QEMU (needs /proc) ifconfig lo 127.0.0.1 -- cgit v1.2.3