X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=utils%2Fpb-console;h=1c2bf62784f62f0aff6faae911063cb385dc71d3;hp=00b25acf44c8d996bafaf178673805766a0f88b0;hb=8c430d0509a2f1f5dc64de308d1c1d2668d2031b;hpb=6e2d2e78a178a40bcbce903020626c62f74bf046 diff --git a/utils/pb-console b/utils/pb-console index 00b25ac..1c2bf62 100644 --- a/utils/pb-console +++ b/utils/pb-console @@ -6,63 +6,114 @@ ui=petitboot-nc shell=sh - +getty=/sbin/getty +use_getty=0 detach=0 usage() { cat >&2 <$console 2>&1 -fi +# we force local terminals to use the linux termcap definition +case "$(tty)" in +/dev/tty[0-9]*) + export TERM=linux + ;; +esac -if [ "$detach" = 1 ] +verbose_opt= +sysinfo_bin=$(dirname $0)/pb-sysinfo +if [ -x $sysinfo_bin ] && $sysinfo_bin --debug-enabled then - ( - pb_loop - ) & -else - pb_loop + verbose_opt=--verbose fi + +while : +do + $ui $verbose_opt + reset + echo "Exiting petitboot. Type 'exit' to return." + $shell +done