| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
|
|
|
|
|
|
|
|
| |
The patch that went upstream for udhcpc's option 209 handling uses the
option name 'pxeconffile' rather than 'conffile', and it was added as a
non-default option:
http://git.busybox.net/busybox/commit/?id=d3092c99ae90f
This change uses the new name, and explicilty requests this option.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
... otherwise we'll try and bring the UI up on the current tty too.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
We need the y-coord, not x.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
The discover_client_boot call is asynchronous, so setting and resetting
prog_mode doesn't gain us anything.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Geoff Levand <geoff@infradead.org>
|
|
|
|
|
|
| |
If the mkdir fails, we'll exit without freeing str.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
We're getting warnings from some compilers about tempnam being unsafe.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
To keep consistent with buttons, which also accept space.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
This change adds:
- 'seconds' to the timeout text entry
- examples to the ip/mask, gateway and DNS text entries
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Currently, when the config form is larger than the screen size, the form
fails to draw.
This change draws the config screen onto a pad instead, which we can
scroll.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
We may receive configuration (or sysinfo) data after the configuration
screen has been displayed. Implement config_screen_update and redraw the
widgetset when new config data arrives.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
It's not obvious why it's there when we're configuring DHCP.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Sets the default values of configuration widgets to the values found in
t he current config.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
This change implements the configuration save action, when the user
submits the nc-config form.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Add network configuration parameters. This requires a somewhat-dynamic
layout, as the fields shown depend on earlier configuration.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
This change adds a simple configuration editor to the ncurses UI.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
We just store the config in the cui for now.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
Now that we have a simple widget set available, use this for the boot
editor.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
We're doing a lot of the same stuff with forms, and we'll to implement a
lot of fields with the upcoming configuration interface.
This change introduces a simple ncurses widget set.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
Add a simple screen for displaying the struct system_info. We add this
to the main menu as a selectable option, and separate it from the boot
option list with an unselectable blank entry.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we talloc_free() the sysinfo and status messages in the
discover client, right after performing the ui's callback.
However, the client may wish to keep a reference to this information
beyond the callback invocation. This change introduces a per-message
talloc context, which these structures are allocated under. This allows
the callbacks to talloc_steal() anything they wish to keep a reference
to.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
We may have nc_scrs that aren't interested in post/unpost information,
so create helper functions that allow a NULL callback.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
When the client sends us a PB_PROTOCOL_ACTION_CONFIG message, we want to
update the current config.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
On client connect, send a PB_PROTOCOL_ACTION_CONFIG message.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
We don't want to require the lib/pb-config interface in the UIs, just
the structure defintions. This change moves them to the common types
header.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Write values back to nvram.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
This change adds config_set, to allow the configuration to be updated,
but calling the storage backend's save() method.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Standard type-safe min & max implementations.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
This change groups the offsetof, container_of and ARRAY_SIZE macros in a
single header file util/util.h.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
We've been compiling with --enable-debug; this change fixes some
problems exposed by the optimiser.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
| |
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
| |
Adding new cases to the pxe parser code of having conffile file without
complete URL and determining conffile names using mac and ip addresses
passed from the udhcpc.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
| |
Update the parser test code/cases as per new prototyping of parse()
function which doesn't require buf and len to be passed from the caller,
instead reading the configuration data either embedded or from file to
a parser's known conffile.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Add a new function parser_request_url() to read the data from
configuration files present remotely. We deprecate
iterate_parser_files() and download_config() functions along with the
'filenames' and 'method' members of the 'parser' structure so that
individual parsers would now require to request the configuration files
data from the parser code and doesn't necessarily export the list of
configuration files.
Add the support to handle incoming DHCP event, done by passing all the
relevant environment variables of the udhcpc to the discover code.
Also, update the pxe parser code to populate the list of configuration
file names as per PXELINUX convention of fallback names using mac and ip
addresses of the booting machine.
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
| |
Signed-off-by: Neelesh Gupta <neelegup@linux.vnet.ibm.com>
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
Ensure all pointers from the context are NULL.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
| |
We're currently seeing empty log files from the discover server. Rather
than only flishing if the server was compiled with debugging enabled,
always perform the fflush.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
We have quite a few pb_logs which should be pb_debug. This change moves
developer-specific info to pb_debug.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
|
|
|
|
| |
Currently, we drop any netlink data beyond our 4096-byte buffer. This
means that we can only parse a limited number of network interfaces.
This change uses recvmsg with MSG_PEEK to determine the size of an
incoming netlink message before doing the actual recvmsg. This way, we
can realloc our buffer to suit.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
We're seeing a problem where ifconf->ignore isn't initialised; use
talloc_zero instead.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
| |
We talloced tempfile, we should be freeing with talloc_free.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|
|
|
|
|
|
|
| |
We have a few allocations hanging around at the end of pb-discover; free
them.
Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
|