···155mount -t tmpfs -o "mode=0755" tmpfs /var/setuid-wrappers
15615700000000000000000158# Run the script that performs all configuration activation that does
159# not have to be done at boot time.
160echo "running activation script..."
···180181# Run any user-specified commands.
182@shell@ @postBootCommands@
0000000183184185# Start systemd.
···155mount -t tmpfs -o "mode=0755" tmpfs /var/setuid-wrappers
156157158+# Optionally log the script output to /dev/kmsg or /run/log/stage-2-init.log.
159+# Only at this point are all the necessary prerequisites ready for these commands.
160+if test -n "@logCommands@"; then
161+ exec {logOutFd}>&1 {logErrFd}>&2
162+ if test -w /dev/kmsg; then
163+ exec > >(tee -i /proc/self/fd/"$logOutFd" | while read line; do
164+ if test -n "$line"; then
165+ echo "stage-2-init: $line" > /dev/kmsg
166+ fi
167+ done) 2>&1
168+ else
169+ mkdir -p /run/log
170+ exec > >(tee -i /run/log/stage-2-init.log) 2>&1
171+ fi
172+fi
173+174+175# Run the script that performs all configuration activation that does
176# not have to be done at boot time.
177echo "running activation script..."
···197198# Run any user-specified commands.
199@shell@ @postBootCommands@
200+201+202+# Reset the logging file descriptors
203+if test -n "@logCommands@"; then
204+ exec 1>&$logOutFd 2>&$logErrFd
205+ exec {logOutFd}>&- {logErrFd}>&-
206+fi
207208209# Start systemd.