X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=utils%2Fpb-console;h=1c2bf62784f62f0aff6faae911063cb385dc71d3;hp=81be2183ca8c2e1f4bef273c0ecbfbda4fc16d62;hb=e1f6ffb9ca9e35738385a3524ba46896a0b519e6;hpb=d28c07b5e23237a97387435e157e248e19128598 diff --git a/utils/pb-console b/utils/pb-console index 81be218..1c2bf62 100644 --- a/utils/pb-console +++ b/utils/pb-console @@ -82,14 +82,38 @@ then if [ "$detach" = 1 ] then $getty -l $0 "$@" & + exit else exec $getty -l $0 "$@" fi fi +for f in /etc/environment /etc/locale +do + if [ -e "$f" ] + then + export $(cat "$f") + 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