X-Git-Url: http://git.ozlabs.org/?a=blobdiff_plain;f=utils%2Fpb-console;h=c071a2f6e5bcce686f82dbf0d098addf111a9c63;hb=e544283809454252c2c2d3148492362ad10643ba;hp=636c5ad36dff65d449d310309989d8c6967e6e65;hpb=d92dcc900005d21911748cc85cd21df04ebad76d;p=petitboot diff --git a/utils/pb-console b/utils/pb-console index 636c5ad..c071a2f 100644 --- a/utils/pb-console +++ b/utils/pb-console @@ -1,49 +1,131 @@ #!/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 +pb_config=pb-config + +usage() { + cat >&2 <$console 2>&1 + PATH=/usr/bin:/usr/sbin:/bin:/sbin fi +PATH=/var/lib/pb-plugins/bin:$PATH +export PATH -if [ "$detach" = 1 ] +verbose_opt= +if $pb_config debug | grep -q enabled then - ( - pb_loop - ) & -else - pb_loop + verbose_opt=--verbose fi + +# kernel messages may write over the ncurses ui - change log level to only +# show particularly important messages +dmesg -n 1 + +while : +do + $ui $verbose_opt + reset + echo "Exiting petitboot. Type 'exit' to return." + $shell +done