3 # Petitboot utility script for running a petitboot UI program
16 pb-console [OPTIONS] -- [ARGS]
19 Start in a detached (background) state.
22 Start a getty (specified by PATH, otherwise $getty),
23 passing additional ARGS to the getty process
26 Use PATH as the exit-to-shell shell
29 Use PATH as the petitboot UI
37 opts=$(getopt --options 'hdg::s:u:' \
38 --long 'help,detach,getty::,shell:,ui:' \
77 if [ "$use_getty" = 1 ]
79 if [ -n "$getty_arg" ]
88 exec $getty -l $0 "$@"
92 for f in /etc/environment /etc/locale
100 # we force local terminals to use the linux termcap definition
107 # we may have been run from udev - ensure we have a sensible PATH
110 PATH=/usr/bin:/usr/sbin:/bin:/sbin
112 PATH=/var/lib/pb-plugins/bin:$PATH
116 if $pb_config debug | grep -q enabled
118 verbose_opt=--verbose
121 # kernel messages may write over the ncurses ui - change log level to only
122 # show particularly important messages
129 echo "Exiting petitboot. Type 'exit' to return."
130 echo "You may run 'pb-sos' to gather diagnostic data"