# 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
--- /dev/null
+.\" 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>
#!/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
+ ;;
--)
;;
*)
while :
do
$ui
- echo "Exiting petitboot. Type 'exit' to return"
+ echo "Exiting petitboot. Type 'exit' to return."
$shell
done
}