summaryrefslogtreecommitdiffstats
path: root/utils/pb-udhcpc
Commit message (Collapse)AuthorAgeFilesLines
* utils: Always pass MAC address in pb-udhcpcSamuel Mendoza-Jonas2016-09-081-2/+3
| | | | | | | | pb-udhcpc currently only passes the interface's MAC address for an 'add' event, however it is useful to know it for any user event concerning a network interface. Pass it to pb-event in all cases. Signed-off-by: Samuel Mendoza-Jonas <sam@mendozajonas.com>
* utils/pb-udhcpc: Unify references to DHCP bootfile parameterJeremy Kerr2014-01-211-8/+10
| | | | | | | | | | | | | | udhcpc may pass the bootfile parameter as either $bootfile or $boot_file, depending on whether the option is present in the BOOTP header, or as a DHCP vendor option. We have code in pb-udhcpc to unify this to $bootfile, but we only use the unified value in one of the user events. This change uses the correct value of bootfile, and fixes the check to conditionally generate the explicit add event. We also need to update the user-event code to use the right event parameter name. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* utils/pb-udhcpc: Fix incorrect reference to $interfaceJeremy Kerr2014-01-201-2/+2
| | | | | | | | We have a typo in the udhcpc hook, where we're not referncing the interface variable correctly. This means we'll get the same device identifier for all netboot options. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* utils/pb-udhcpc: remove bashism when reading mac addressJeremy Kerr2014-01-201-1/+1
| | | | | | | The $(< FILE) syntax we use to read an interface's MAC address doesn't work in dash or busybox sh. Instead, use cat. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Support DHCP "pathprefix" configuration optionJeremy Kerr2014-01-171-1/+2
| | | | | | | | | | | | | | | | | This change implements support for the DHCP "pathprefix" option. We use the following logic: - If pathprefix is present and a full URL, we base the config file location on pathprefix + conffile - If pathprefix is present but not a full URL, we use it as the path component of the URL, and pick up the host from other parameters in the DHCP response - If no pathprefix is present, we determine the configuration prefix from the DHCP bootfile parameter. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* discover: Use pxeconffile for udhcpc option nameJeremy Kerr2013-11-221-1/+1
| | | | | | | | | | | | 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>
* discover: Change parsers to explicitly request configuration filesNeelesh Gupta2013-11-061-78/+25
| | | | | | | | | | | | | | | | | | | 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>
* utils/pb-udhcp: Don't add a new option on renewJeremy Kerr2013-10-091-1/+1
| | | | | | Otherwise we'll keep collecting new options every $lease_time period. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* pb-udhcpc: use plain kernel names for dhcp eventsJeremy Kerr2013-09-241-5/+5
| | | | | | No need to prefix with /net/ Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* pb-udhcpc: Fix string returned from resolve_urlJeremy Kerr2013-09-061-0/+1
| | | | | | In the 'as-is' case, we were echoing both URLs. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* pb-udhcp: Fix MAC-address-based configuration file locationJeremy Kerr2013-07-231-2/+2
| | | | | | | | We're currently requesting a colon-separated MAC address. Instead, we need it to be hypen-separated, and prefixed with the ethernet type ("01-"). Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* pb-udhcp: PXE fixesJeremy Kerr2013-07-231-5/+5
| | | | | | Fix a couple of bugs in the udhcp script. Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* pb-udhcpc: Look for more boot optionsJeremy Kerr2013-05-091-2/+82
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* utils/pb-udhcpc: Use command-line format of pb-eventJeremy Kerr2013-05-091-2/+5
| | | | Signed-off-by: Jeremy Kerr <jk@ozlabs.org>
* pb-udhcpc: Fix generation of TFTP URLsJeremy Kerr2013-04-101-1/+1
| | | | | | | | | | | | DHCP boot-file parameters may not contain a preceeding slash. In this case, the current udhcp script will not form a correct URL. This change adds the slash unconditionally; in the case that the pathname already has a preceeding slash, the URL parser will handle this correctly. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Geoff Levand <geoff@infradead.org>
* Convert echo to printf in scriptsGeoff Levand2012-10-161-4/+4
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Log file cleanupsGeoff Levand2012-03-081-1/+1
| | | | Signed-off-by: Geoff Levand <geoff@infradead.org>
* Rename udhcpc to pb-udhcpcGeoff Levand2012-02-121-0/+38
Signed-off-by: Geoff Levand <geoff@infradead.org>
OpenPOWER on IntegriCloud