All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v2 0/3] Search for specific config files using UUID, MAC and IP
@ 2019-10-18  7:59 Javier Martinez Canillas
  2019-10-18  7:59 ` [PATCH v2 1/3] Add %X option to printf functions Javier Martinez Canillas
                   ` (2 more replies)
  0 siblings, 3 replies; 6+ messages in thread
From: Javier Martinez Canillas @ 2019-10-18  7:59 UTC (permalink / raw)
  To: grub-devel
  Cc: Vladimir Serbinenko, Daniel Kiper, Paulo Flabiano Smorigo,
	Javier Martinez Canillas

Hello,

This is a 2nd version of a series that have been carried in Fedora (and
other distros) for a long time. It allows to fetch GRUB configurations
that are customized for each machine by using the client UUID, MAC and
IP addresses as suffixes for the grub.cfg file.

The procedure is similar to what is used by pxelinux and yaboot, i.e:
http://www.syslinux.org/wiki/index.php/PXELINUX#config

Patch #1 adds a %X format specifier to make the grub_printf() function
more similar to printf() and not require to use %x plus grub_toupper().

Patch #2 sets net_<interface>_client{id,uuid} environment variables by
using the DHCP client ID and UUID options if these are found.

Finally Patch #3 adds the support to fetch the config files using the
UUID, MAC and IP as suffixes. If these aren't found, the default GRUB
config filename is used as a fallback.

Best regards,
Javier

Changes in v2:
- Put patch that adds the %X format specifier first in the series.
- Use the existing grub_env_set_net_property() and remove duplicated code.
- Add Reviewed-by tag from Daniel Kiper.

Paulo Flabiano Smorigo (3):
  Add %X option to printf functions
  Set net_<interface>_client{id,uuid} variables from DHCP options
  Search for specific config files for netboot

 grub-core/kern/misc.c   |   7 ++-
 grub-core/net/bootp.c   |  48 ++++++++++++++---
 grub-core/net/net.c     | 117 ++++++++++++++++++++++++++++++++++++++++
 grub-core/normal/main.c |  17 ++++--
 include/grub/net.h      |   5 ++
 5 files changed, 180 insertions(+), 14 deletions(-)

-- 
2.21.0



^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2019-10-22  8:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-10-18  7:59 [PATCH v2 0/3] Search for specific config files using UUID, MAC and IP Javier Martinez Canillas
2019-10-18  7:59 ` [PATCH v2 1/3] Add %X option to printf functions Javier Martinez Canillas
2019-10-18  7:59 ` [PATCH v2 2/3] Set net_<interface>_client{id, uuid} variables from DHCP options Javier Martinez Canillas
2019-10-21 14:40   ` [PATCH v2 2/3] Set net_<interface>_client{id,uuid} " Daniel Kiper
2019-10-22  8:08     ` [PATCH v2 2/3] Set net_<interface>_client{id, uuid} " Javier Martinez Canillas
2019-10-18  7:59 ` [PATCH v2 3/3] Search for specific config files for netboot Javier Martinez Canillas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.