X-Git-Url: https://git.ozlabs.org/?a=blobdiff_plain;ds=sidebyside;f=utils%2Fpb-console;h=c96ac9825d870e3039fb24d86706b50e4c988871;hb=7048bb4f8667dc0ce7cf46e96a8db07622d9a39f;hp=636c5ad36dff65d449d310309989d8c6967e6e65;hpb=d92dcc900005d21911748cc85cd21df04ebad76d;p=petitboot diff --git a/utils/pb-console b/utils/pb-console index 636c5ad..c96ac98 100644 --- a/utils/pb-console +++ b/utils/pb-console @@ -1,16 +1,33 @@ #!/bin/sh +# +# Petitboot utility script for running a petitboot UI program +# on a console tty. +# ui=petitboot-nc shell=sh 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 + exit 1 +} + while [ -n "$1" ] do case "$1" in - -d) + --detach | -d) detach=1 ;; + --help | -h) + usage + ;; --) ;; *) @@ -29,7 +46,7 @@ pb_loop() { while : do $ui - echo "Exiting petitboot. Type 'exit' to return" + echo "Exiting petitboot. Type 'exit' to return." $shell done }