From: Geoff Levand Date: Sun, 19 May 2013 13:07:02 +0000 (+0800) Subject: util/pb-console: Packaging updates X-Git-Tag: v1.0.0~605 X-Git-Url: http://git.ozlabs.org/?p=petitboot;a=commitdiff_plain;h=e39b409ec6863ade2e070f7ed2236cee0ca46180;hp=7d20772cc7b4d258ee878b4cb30b313f14502dc7 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 --- 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 +.\" +.\" 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 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 }