···7171mkdir -p /run
7272mount -t tmpfs -o "mode=0755,size=@runSize@" tmpfs /run
73737474-7575-# Optionally log the script output to /dev/kmsg or /run/log/stage-1-init.log.
7474+# Log the script output to /dev/kmsg or /run/log/stage-1-init.log.
7675mkdir -p /tmp
7776mkfifo /tmp/stage-1-init.log.fifo
7877logOutFd=8 && logErrFd=9
7978eval "exec $logOutFd>&1 $logErrFd>&2"
8079if test -w /dev/kmsg; then
8181- tee -i < /tmp/stage-1-init.log.fifo /proc/self/fd/"$logOutFd" | while read line; do
8080+ tee -i < /tmp/stage-1-init.log.fifo /proc/self/fd/"$logOutFd" | while read -r line; do
8281 if test -n "$line"; then
8382 echo "<7>stage-1-init: $line" > /dev/kmsg
8483 fi
+2-2
nixos/modules/system/boot/stage-2-init.sh
···155155mount -t tmpfs -o "mode=0755" tmpfs /var/setuid-wrappers
156156157157158158-# Optionally log the script output to /dev/kmsg or /run/log/stage-2-init.log.
158158+# Log the script output to /dev/kmsg or /run/log/stage-2-init.log.
159159# Only at this point are all the necessary prerequisites ready for these commands.
160160exec {logOutFd}>&1 {logErrFd}>&2
161161if test -w /dev/kmsg; then
162162- exec > >(tee -i /proc/self/fd/"$logOutFd" | while read line; do
162162+ exec > >(tee -i /proc/self/fd/"$logOutFd" | while read -r line; do
163163 if test -n "$line"; then
164164 echo "<7>stage-2-init: $line" > /dev/kmsg
165165 fi