on Friday 12 June 2009 Babarovic Ivica wrote:
Is it possible to see output on stdout and stderr of the script without the user confirmation via feddback tag?
no, it's not possible but maybe not a bad idea to implement it for the future. I put it on my TODO (or at least on my TOLOOKAT) list. ;)
The way I handle it is to make my scripts chvt to an unused console
and then explicitly redirect the output to that console. At the
end of the script, it switches back to the original console.
For example (from a chroot-script):
CURVT=`chroot /mnt /bin/fgconsole`
[ -z "$CURVT" ] && CURVT=1
NEWVT=16; DEVVT=/dev/tty$NEWVT
chroot /mnt /bin/chvt $NEWVT
# If this is a serial console, we should write there instead
cons=`sed 's/.*console=\([^ ,]*\).*/\1/' /proc/cmdline`
case "$cons" in
ttyS*) DEVVT=/dev/$cons ;;
*) DEVVT=/dev/tty$NEWVT ;;
esac
echo "Starting script (`date`):" > $DEVVT
if grep -q '\