X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=utils%2Fpb-console;h=d846ea7614703dd80f590f45a6f74341889dd773;hp=c96ac9825d870e3039fb24d86706b50e4c988871;hb=af805399e80ae70a9fc7af9b47d76577be44a683;hpb=e39b409ec6863ade2e070f7ed2236cee0ca46180 diff --git a/utils/pb-console b/utils/pb-console index c96ac98..d846ea7 100644 --- a/utils/pb-console +++ b/utils/pb-console @@ -6,61 +6,100 @@ ui=petitboot-nc shell=sh - +getty=/sbin/getty +use_getty=0 detach=0 usage() { - echo "pb-console [OPTIONS] console_dev" >&2 - echo "OPTIONS" >&2 - echo " -d, --detach" >&2 - echo " Start in a detached (background) state." >&2 - echo " -h, --help" >&2 - echo " Print a help message." >&2 + cat >&2 <$console 2>&1 -fi +for f in /etc/environment /etc/locale +do + if [ -e "$f" ] + then + export $(cat "$f") + fi +done -if [ "$detach" = 1 ] -then - ( - pb_loop - ) & -else - pb_loop -fi +while : +do + $ui + reset + echo "Exiting petitboot. Type 'exit' to return." + $shell +done