summaryrefslogtreecommitdiffstats
path: root/utils/pb-console
Commit message (Collapse)AuthorAgeFilesLines
* pb-console: don't modify PATH unless it's emptyJeremy Kerr2019-10-081-3/+1
| | | | | | | | | | | We're now running pb-console through a proper login shell, so we shouldn't need to modify PATH, as we expect it to be properly set up by the shell profile. This change removes the unconditional PATH modification, so we only set a basic PATH if it's currently empty. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* pb-console: start shell as a login shellJeremy Kerr2019-10-081-1/+1
| | | | | | | | | | | | | The environment that pb-console starts is minimal, as we have likely been run by udev. Because we're starting a shell, we want the proper profile set up, so run as a login shell. This assumes the shell accepts -l, but we already have an assumption for supporting -m (as /bin/ash does). Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* utils/pb-console: Use -m to run shell in own process groupv1.10.3Samuel Mendoza-Jonas2019-04-011-1/+1
| | | | | | | | Use -m to have the shell spawned by pb-console run it its own process group, allowing commands such as Ctrl-C (SIGINT) to behave as expected rather than killing the shell. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* utils/pb-console: Trap SIGTERM on bootv1.10.2Samuel Mendoza-Jonas2019-03-061-2/+1
| | | | | | | | | | | | | | | | On kexec all processes will be sent a SIGTERM and SIGKILL. By default there are messages on the console alerting the user to this, however in some implementations these messages are disabled. This can have the effect of the UI seemingly exiting to the shell on boot and hanging for a short while before the kexec actually jumps into the next kernel. Trap the SIGTERM sent to the pb-console parent process and print a short message to the screen instead of momentarily dropping to the shell and printing the usual help messages. While here also cleanup the shell help messages below which are now handled in the shell's .shrc file. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* utils/pb-console: Ignore SIGINTSamuel Mendoza-Jonas2018-12-031-0/+2
| | | | | | | Trap and ignore SIGINT to avoid a SIGINT intended for petitboot-nc also exiting the parent pb-console script. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* utils/pb-console: Set up controlling terminalSamuel Mendoza-Jonas2018-12-031-1/+1
| | | | | | Enabling job control in the shell. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* utils/pb-console: Support agetty's autologin optionSamuel Mendoza-Jonas2018-12-031-2/+14
| | | | | | | | If the getty arguments include '-a' do not set the '-l' option. This implies the environment has been configured with users and will launch the subsequent pb-console instance itself. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* utils: Add diagnostic scriptv1.1.0Samuel Mendoza-Jonas2016-05-241-0/+1
| | | | | | | | | | | | | | | | Add a simple script to gather up useful information in the unlikely event a user runs into trouble. Usage: pb-sos [-v] [-f file] [-d user@host:/path] Options -v verbose output -f file Supply filename for tar archive (default pb-sos.tar) -d host Supply user, hostname, and path to transfer archive to a remote host Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* pb-console: Reduce kernel log output before starting UISamuel Mendoza-Jonas2016-05-061-0/+4
| | | | Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* pb-console: Always add plugins directory to PATHJeremy Kerr2015-09-021-1/+2
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* pb-plugin: Move plugin wrappers to a separate dirJeremy Kerr2015-08-271-1/+1
| | | | | | Use /var/lib/pb-plugins/bin, to prevent overwriting system binaries. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* utils/pb-console: establish PATH before running pb-configJeremy Kerr2015-04-141-0/+7
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Add debug flag to configJeremy Kerr2014-08-051-2/+2
| | | | | | | | | | This change adds a debug flag to the config, and groups it under not-user-modifiable parts of struct config. This means we no longer need the pb-sysinfo helper, as the last remaining function (--debug-enabled) can be implemented with pb-config. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* utils/pb-console: use a linux termcap entry for local consolesJeremy Kerr2014-05-191-0/+7
| | | | | | For local consoles, we always want a TERM=linux. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* log: Allow runtime selection of 'debug' log levelJeremy Kerr2014-04-071-1/+8
| | | | | | | | | | | | | | | | | Currently, we need to compile with -DDEBUG to implement debug-level logging in the UIs and discover server. Since we may not be able to easily replace a system's petitboot binaries, this change introduces a -v|--verbose option to the discver server and ncurses UI, which enables debug at runtime. We also move some of the udev debug code out of an #ifdef DEBUG block. Since petitboot is generally started on boot, we also add a little infrastructure to pass -v to petitboot on certain system contitions: either petitboot.debug on the kernel command line, or a petitboot,debug? NVRAM property containing the value 'true'. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* utils/pb-console: Exit after running getty in detached stateJeremy Kerr2013-11-221-0/+1
| | | | | | ... otherwise we'll try and bring the UI up on the current tty too. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* utils/pb-console: reset after UI exitJeremy Kerr2013-11-141-0/+1
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* pb-console: Read /etc/environment and /etc/localeJeremy Kerr2013-07-231-0/+8
| | | | | | | Since we're starting from no environment on the consoles, allow specifying an initial environment. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* utils/pb-console: use getty rather than execJeremy Kerr2013-05-201-31/+58
| | | | | | exec is a bit flaky for starting on consoles, so use getty instead. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* utils/pbconsole: Use here-document for usage textJeremy Kerr2013-05-201-6/+8
| | | | | | Allows for cleaner usage message in the source. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* util/pb-console: Packaging updatesGeoff Levand2013-05-191-2/+19
| | | | | | | 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>
* utils: Add pb-console utilJeremy Kerr2013-05-091-0/+49
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
OpenPOWER on IntegriCloud