summaryrefslogtreecommitdiffstats
path: root/utils
diff options
context:
space:
mode:
authorGeoff Levand <geoff@infradead.org>2013-05-19 21:07:02 +0800
committerGeoff Levand <geoff@infradead.org>2013-05-19 21:07:02 +0800
commite39b409ec6863ade2e070f7ed2236cee0ca46180 (patch)
treeec133aa73e75120108c6dc5516e924a5dc0faa4d /utils
parent7d20772cc7b4d258ee878b4cb30b313f14502dc7 (diff)
downloadtalos-petitboot-e39b409ec6863ade2e070f7ed2236cee0ca46180.tar.gz
talos-petitboot-e39b409ec6863ade2e070f7ed2236cee0ca46180.zip
util/pb-console: Packaging updates
In preparation for packaging add a man page, a help option, and some comments to the script. Signed-off-by: Geoff Levand <geoff@infradead.org>
Diffstat (limited to 'utils')
-rw-r--r--utils/pb-console21
1 files changed, 19 insertions, 2 deletions
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
}
OpenPOWER on IntegriCloud