]> git.ozlabs.org Git - petitboot/blobdiff - utils/pb-console
autotools: Use non-recursive make
[petitboot] / utils / pb-console
index b1c8003ef841d155b81051a9dc091beec83ff7d0..1c2bf62784f62f0aff6faae911063cb385dc71d3 100644 (file)
@@ -82,6 +82,7 @@ then
        if [ "$detach" = 1 ]
        then
                $getty -l $0 "$@" &
+               exit
        else
                exec $getty -l $0 "$@"
        fi
@@ -95,9 +96,24 @@ do
        fi
 done
 
+# we force local terminals to use the linux termcap definition
+case "$(tty)" in
+/dev/tty[0-9]*)
+       export TERM=linux
+       ;;
+esac
+
+verbose_opt=
+sysinfo_bin=$(dirname $0)/pb-sysinfo
+if [ -x $sysinfo_bin ] && $sysinfo_bin --debug-enabled
+then
+       verbose_opt=--verbose
+fi
+
 while :
 do
-       $ui
+       $ui $verbose_opt
+       reset
        echo "Exiting petitboot. Type 'exit' to return."
        $shell
 done