X-Git-Url: https://git.ozlabs.org/?p=petitboot;a=blobdiff_plain;f=utils%2Fpb-console;h=e3bc8af14047b5872d8ad7f680e1521f289bd9ca;hp=636c5ad36dff65d449d310309989d8c6967e6e65;hb=059262751021d17ffa6d7f474cf25df0f297d23e;hpb=d92dcc900005d21911748cc85cd21df04ebad76d diff --git a/utils/pb-console b/utils/pb-console index 636c5ad..e3bc8af 100644 --- a/utils/pb-console +++ b/utils/pb-console @@ -1,49 +1,104 @@ #!/bin/sh +# +# Petitboot utility script for running a petitboot UI program +# on a console tty. +# ui=petitboot-nc shell=sh - +getty=/sbin/getty +use_getty=0 detach=0 -while [ -n "$1" ] +usage() { + 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