@@ -60,15 +60,15 @@ chmod 0755 "$mountPoint/dev" "$mountPoint/sys"
6060mount --rbind /dev "$mountPoint/dev"
6161mount --rbind /sys "$mountPoint/sys"
6262
63−# If silent, write both stdout and stderr of activation script to /dev/null
64−# otherwise, write both streams to stderr of this process
65−if [ "$silent" -eq 0 ]; then
66− PIPE_TARGET="/dev/stderr"
67−else
68− PIPE_TARGET="/dev/null"
69−fi
63+(
64+ # If silent, write both stdout and stderr of activation script to /dev/null
65+ # otherwise, write both streams to stderr of this process
66+ if [ "$silent" -eq 1 ]; then
67+ exec 2>/dev/null
68+ fi
7069
71−# Run the activation script. Set $LOCALE_ARCHIVE to supress some Perl locale warnings.
72−LOCALE_ARCHIVE="$system/sw/lib/locale/locale-archive" chroot "$mountPoint" "$system/activate" >>$PIPE_TARGET 2>&1 || true
70+ # Run the activation script. Set $LOCALE_ARCHIVE to supress some Perl locale warnings.
71+ LOCALE_ARCHIVE="$system/sw/lib/locale/locale-archive" chroot "$mountPoint" "$system/activate" 1>&2 || true
72+)
7373
7474exec chroot "$mountPoint" "${command[@]}"