#!/bin/bash # # postandrestore.bash # # for tracing a POST call and restoring the previous graphics mode # (useful when using an fbcon) VBTT="`dirname "$0"`/vbtracetool" TEMP=`getopt -o dlr -n 'postandrestore.bash' -- "$@"` if [ $? != 0 ] ; then echo "Terminating..." >&2 ; exit 1 ; fi eval set -- "$TEMP" debug="" log="" shadow="" while true ; do case "$1" in -d) debug=$1 ; shift ;; -l) log=$1 ; shift ;; -r) shadow=$1 ; shift ;; --) shift ; break ;; *) echo "Option parsing error!" ; exit 1 ;; esac done for arg do echo 'Invalid argument '"\`$arg'" ; exit 1 ; done mode=$($VBTT $shadow -g | tail -1 | sed 's/^.*(//g' | sed 's/)//g') $VBTT $debug $log $shadow -p $VBTT $shadow -s $mode > /dev/null echo ""