| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
|
|
|
|
|
|
|
| |
Create a new Petitboot option 'petitboot,write?' that specifies whether
the system is allowed to mount devices read-write. The option can be
toggled by the user in the nc-config screen.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This change implements a few minor tweaks for the bootorder layout
interface:
- make the verical spacing of widgets more consistent (we have
a couple of 3-line gaps)
- use a consistent 2-space gap between buttons on the same line
- clarify the title text for the subset widget instance, and
move the select widget closer to the title
- use consistent title-case for widget labels
- left-align the select & button widgets on the subset screen, for
consistency with other screens
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
The currently selected item in the main menu can be set to an item off
the visible portion of the menu after the additional or removal of a
boot option. Update the currently selected item and/or the current view
such that the item remains in the visible area.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
| |
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
|
| |
Display the current IPMI bootdev override if it exists, and allow the
user to clear it from the configuration screen.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
| |
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Move petitboot to a more familiar 'boot-order' based autoboot system.
The discover server now reads multiple values from the petitboot,bootdev
parameter and adds them in order to config->autoboot_opts. Boot priority
is determined by the options' position in the list.
On the client, nc-config now recognises the new boot order, and allows
the user to add, remove, and reorder the devices in the list.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
|
|
|
| |
Changing the visual order of widgets will cause their associated fields to be
out of order relative to the widgetset field array. Rather than manually
resorting the array, use sorted navigation to move according to a field's
visual positon
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
|
|
|
|
| |
The nc-subset screen is intended to be used as a sub-screen from the
current screen (eg. nc-config) which passes a pointer to a
nc_widget_subset struct. The nc-subset screen allows the user to select
an option from a list of 'inactive' options, before returning control
back to the current screen.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
|
|
| |
The new nc_widget_subset is similar to nc_widget_select, but hides added
options until they are made active. This allows the widget to have
multiple options selected and ordered without cluttering the screen.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
All current *_post() methods in ui/ncurses call redrawwin() and
wrefresh() together. wrefresh() updates any lines on the screen that
have been marked as changed or invalid. However redrawwin() marks the
entire screen as invalid unconditionally. We can reduce the amount of
data written to the screen by avoiding calls to redrawwin().
Screen transitions are the primary use case of redrawwin(), where the
whole screen must be invalidated to avoid stale data remaining on
screen. All other 'in-screen' updates such as changes to widgets or
changing focus do not require a call to redrawwin(). The most noticeable
performance improvement is in nc-menu, which makes an unnecssary call to
redrawwin() after every addition to the boot option menu.
eg. The number of bytes written to STDOUT in the main menu:
# Boot options | Before | After
--------------------------------
8 | 5488 | 1149
133 | 422454 | 4652
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
|
|
|
| |
A boot option requires an image path at minimum. If an option is
created without an image, trying to edit the resulting user item causes
a segfault. Prevent the user from creating a boot option without at
least an image path.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
| |
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
|
|
| |
Widgets running over the horizontal width of the pad will cause the
screen to blank. Expand the (non-viewable) size of the pad to prevent
blanking until shorter translations are available for nc-config.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
| |
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
| |
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
| |
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
| |
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
| |
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
|
|
|
|
|
|
| |
We have a couple of strings that are missing the gettext call.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we have a bug where we can't clear a boot device UUID, as we
only update config->boot_device if we're in AUTOBOOT_ONE state. This
means that the config UI can't be used to change out of "autoboot from a
single device" mode.
This sets the autoboot device unconditionally, allowing it to be
cleared.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add the initial translation set for de, en, es, fr, it, ja, ko, pt_BR,
ru, zh_CN and zh_TW languages.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
| |
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
The Configuration screen help doesn't reflect the option name, so
update that to match. Also, fix the wording of the "Rescan devices"
help.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Selecting 'OK' in the configuration or language select screen will send
a configuration change to the server and exit safe mode.
Exit safe mode explicity and warn the user that they are about to exit
it.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
We should make it clear that we're looking for a PXE-style config file.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
The language, rescan and retrieve options are new, so add them to the
help text.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
We're not using gettext for the device label strings; this change adds
the necessary macros to do so.
Also, we change "Interface" to "Network", to make the label a little
more obvious.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
With the current testing infrastructure, we don't have a strictly
hierarchical set of dependencies. This causes problems with a recursive
make, and means we have to hack around some of the dependencies.
This change generates a single, top-level makefile from all of the
Makefile.am fragments. We still need the po/ directory as a separate
SUBDIR, but all others can be converted to non-recursive.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Creates a menu option to specify a remote conf file url to send to
the server for parsing.
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
This change adds a language selector UI, and allows language changes
from incoming configuration messages.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
We'll want to re-initialise the petitboot main menu (when the language
is changed), which we can't do if the items are populated entirely from
the main() function.
This change moves the menu initilisation to the cui code, we we can
re-init when necessary.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
No translation necessary.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Because it's initialised statically, help text won't be directly
gettext()-ed. Instead, we need to perform the gettext translation at
runtime, and pass untranslated strings into the help_screen code.
Instead of trusting callers to pass the untranslated strings though, we
encapsulate the help text data into struct help_text, so we know we have
an unstranslated string.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Boot options are now listed under their matching boot device in the
ncurses UI to help differentitate similar boot option names
Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Since we may have a long list of devices on the configuration screen,
we'd like a way to jump between widgets. This change repeats the
PREV_FIELD/NEXT_FIELD driver request on these events.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
The 'Network' label was originally intended as a header, but we should
keep it consistent with other field labels.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a configuration setting for the default boot device.
We change the autoboot option to a select, as we have three possible
behaviours for autoboot:
( ) Don't autoboot
( ) Autoboot from any disk/network device
( ) Only autoboot from a specific disk/network device
The latter option will show a list of possible devices to seelct for
autoboot behaviour.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
We always pass screen->net_conf_type as this parameter, so we may as
weel grab it from screen directly.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Incoming status messages can be an arbitrary length; if so, the status
line may be corrupt.
This change uses the 'n' variant of mvwaddnstr(), so we only write one
line of characters.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
We need to check for equality with opt_yes, not just check for non-zero.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
We're seeing occasionaly failures to autoboot due to supirious key
events (getch() returing -1) on an IPMI console.
This change modifies the process_key logic to only abort the default if
we see a valid key event.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Petitboot environments will probably want a basic terminfo defintion
(eg, vt220) rather than a full linux or xterm, but vt220 and friends
don't define a backtab key. Backtab can be useful for proper form
navigation, and without a key definition, we just get an escape, which
exits the current screen.
This change provides a static definition for KEY_BTAB, so we should
always have one available.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Fields without O_STATIC can "scroll" horizontally, and we may miss a
left-hand section of text from the current display. This can mean that
the user can't leave a validated field with no indication why, if the
off-to-the-left data is not a valid entry.
This change adds a widgetset function to mark a field as fixed-size, so
we don't have this scrolling behaviour. This means that the entire field
contents will always be visible, and any validation errors can be seen.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|