X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=utils%2Fpb-console;h=81be2183ca8c2e1f4bef273c0ecbfbda4fc16d62;hp=00b25acf44c8d996bafaf178673805766a0f88b0;hb=d28c07b5e23237a97387435e157e248e19128598;hpb=6e2d2e78a178a40bcbce903020626c62f74bf046 diff --git a/utils/pb-console b/utils/pb-console index 00b25ac..81be218 100644 --- a/utils/pb-console +++ b/utils/pb-console @@ -6,63 +6,90 @@ ui=petitboot-nc shell=sh - +getty=/sbin/getty +use_getty=0 detach=0 usage() { cat >&2 <$console 2>&1 + if [ -n "$getty_arg" ] + then + getty="$getty_arg" + fi + if [ "$detach" = 1 ] + then + $getty -l $0 "$@" & + else + exec $getty -l $0 "$@" + fi fi -if [ "$detach" = 1 ] -then - ( - pb_loop - ) & -else - pb_loop -fi +while : +do + $ui + echo "Exiting petitboot. Type 'exit' to return." + $shell +done