summaryrefslogtreecommitdiffstats
path: root/discover/event.h
Commit message (Collapse)AuthorAgeFilesLines
* discover: Deprecate 'conf' user eventSamuel Mendoza-Jonas2016-09-081-1/+0
| | | | | | | | | | | | The 'conf' user event is functionally very similar to the 'url' event, in that both events result in downloading a specified configuration file and passing it to iterate_parsers(). The 'url' event additionally allows downloading files from a directory path and is also accessed by the UI via pb-protocol, so remove the 'conf' event and associated functions in favour of 'url' and device_handler_process_url(). Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Add 'sync' user eventSamuel Mendoza-Jonas2016-08-081-0/+1
| | | | | | | | | | | | | | | | | | | | Add a user event named 'sync' that causes the discover server to merge the devicemapper snapshots of mounted devices. This is particularly useful as a debug aid (for example, when copying logs to a USB device), as the server will otherwise only sync changes to mounted devices in response to parser actions. The command can be called as pb-event sync@device to sync a particular device, or as pb-event sync@all to sync all devices with snapshots. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* pb-event: Add 'boot' user eventSamuel Mendoza-Jonas2016-05-061-0/+1
| | | | | | | | | | | Add a user event to send a boot command to the discover server. The format of the boot command is similar to the add command, eg: pb-event boot@eth0 image="http://host/image" initrd="http://host/initrd" and also recognises "id", "dtb", and "args" arguments. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* discover: Enable 'url' pb-eventsSamuel Mendoza-Jonas2014-07-281-0/+1
| | | | | | | | | | Adds a new option to pb-event; ./pb-event url@dev url=scheme://path/to/petitboot.conf Specifies a remote conf file to parse for boot options Signed-off-by: Samuel Mendoza-Jonas <sam.mj@au1.ibm.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Change parsers to explicitly request configuration filesNeelesh Gupta2013-11-061-0/+1
| | | | | | | | | | | | | | | | | | | 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>
* discover/event: Add event_set_paramJeremy Kerr2013-05-091-2/+3
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Add configuration events & DHCP handlerJeremy Kerr2013-04-291-0/+1
| | | | | | | | | | This change adds a new event type, EVENT_ACTION_CONF. These events supply a new configuration URL that petitiboot should download and parse. With this in place, we can receive DHCP configuration events. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* event: Make strings constGeoff Levand2013-04-281-3/+3
| | | | | | | The processing of events does not modify the event strings, so change the strings in struct event to const (read-only). Signed-off-by: Geoff Levand <geoff@infradead.org>
* discover: simplify handler switch statementJeremy Kerr2013-03-051-0/+2
| | | | | | | | Instead of using nested switch statements in device_handler_event, define an array of handlers, and lookup instead. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* Make udev_event a generic eventGeoff Levand2009-06-301-0/+29
The struct udev_event can be used as a generic event, so rename it struct event and move it from udev.h into a new file event.h. Also, rename the emums UDEV_ACTION_ADD and UDEV_ACTION_REMOVE to ACTION_UDEV_ADD and ACTION_UDEV_REMOVE. Signed-off-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
OpenPOWER on IntegriCloud