summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--man/Makefile.am2
-rw-r--r--man/pb-console.836
-rw-r--r--utils/pb-console21
3 files changed, 56 insertions, 3 deletions
diff --git a/man/Makefile.am b/man/Makefile.am
index 4d4301b..75a6bc3 100644
--- a/man/Makefile.am
+++ b/man/Makefile.am
@@ -12,6 +12,6 @@
# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
#
-dist_man_MANS = pb-discover.8 pb-event.8 petitboot-nc.8 petitboot-twin.8 pb-udhcpc.8 petitboot.8
+dist_man_MANS = pb-console.8 pb-discover.8 pb-event.8 petitboot-nc.8 petitboot-twin.8 pb-udhcpc.8 petitboot.8
MAINTAINERCLEANFILES = Makefile.in
diff --git a/man/pb-console.8 b/man/pb-console.8
new file mode 100644
index 0000000..1430f22
--- /dev/null
+++ b/man/pb-console.8
@@ -0,0 +1,36 @@
+.\" Copyright Geoff Levand <geoff@infradead.org>
+.\"
+.\" This program is free software; you can redistribute it and/or modify
+.\" it under the terms of the GNU General Public License as published by
+.\" the Free Software Foundation; version 2 of the License.
+.\"
+.\" This program is distributed in the hope that it will be useful,
+.\" but WITHOUT ANY WARRANTY; without even the implied warranty of
+.\" MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+.\" GNU General Public License for moZZre details.
+.\"
+.\" You should have received a copy of the GNU General Public License
+.\" along with this program; if not, write to the Free Software
+.\" Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
+.\"
+.Dd ""
+.Dt pb-console 8
+.Os
+.\"
+.Sh NAME
+.\" ====
+.Nm pb-console
+.Nd Petitboot console utility script
+.\"
+.Sh DESCRIPTION
+.\" ===========
+Petitboot utility script for running a petitboot UI program
+on a console tty.
+.\"
+.Sh SEE ALSO
+.\" ========
+.Xr petitboot 8
+.\"
+.Sh REPORTING BUGS
+.\" ==============
+Send bug reports to Geoff Levand <geoff @ infradead.org>
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