Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iMpq5-0006j0-Oe for mharc-grub-devel@gnu.org; Tue, 22 Oct 2019 04:48:25 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48831) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iMpq3-0006gR-Jd for grub-devel@gnu.org; Tue, 22 Oct 2019 04:48:24 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iMpq2-0004qu-Fd for grub-devel@gnu.org; Tue, 22 Oct 2019 04:48:23 -0400 Received: from mx1.redhat.com ([209.132.183.28]:36824) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iMpq2-0004qm-7z for grub-devel@gnu.org; Tue, 22 Oct 2019 04:48:22 -0400 Received: from mail-wm1-f71.google.com (mail-wm1-f71.google.com [209.85.128.71]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 4BF6F2026F for ; Tue, 22 Oct 2019 08:48:21 +0000 (UTC) Received: by mail-wm1-f71.google.com with SMTP id z24so5857839wmk.8 for ; Tue, 22 Oct 2019 01:48:21 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=28DQMquugF3sNx+E8U0zotPoRq0QejxgcB52SLsQS4Q=; b=JhOQioeyCS214mLkOgbYlfdI3av8vu3CxyTsI19UChSI0OPgwqOTVDZhgAo50VSPiA AddjhZQ4hvYcReVu77unXYUKdkhft1mxQtj6AeprFXIfuvXHy87UYYsVN9aryjt7dQBt gA07CbOd5d3bwHc154tPD3LhtvZAQyW8B/3SqV5lL/X3aRRtKpGhUO8sx8nq4IxhFpPs Rc8to03mh8VGBTKkOy/CRewBpEVcSnyCU8NfRyhLubOgBXmWL+N7lwsERIrkGbUSDhJb IRFpzYpcpD3ClPXXTxCfoyCAA1xUlrgaQwotPwMBNLR56aw9+WK6FToZiT8Uj4+XT7Mk IxPw== X-Gm-Message-State: APjAAAVUV3D924E/9LlYygyhjN+Hzw1bdSQHRPp9LR4Ie0PqywZv1lqX l1TqSOzyALR3hRsfPCLDT8eUQZ7kR5oKtDk5Cghsc8vb12AZRFSlMbx+jbgGK2vfFE/disUzsQM 9RNA9X3VPxH4= X-Received: by 2002:a1c:9dd3:: with SMTP id g202mr1990485wme.43.1571734099645; Tue, 22 Oct 2019 01:48:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqxsRCPfWmmRBfGUU/SvArSw60iC93Efj6XgZe0pKe7LJy0oTBHck/Sxs3v/Lmd2wZqOvvNQFw== X-Received: by 2002:a1c:9dd3:: with SMTP id g202mr1990460wme.43.1571734099367; Tue, 22 Oct 2019 01:48:19 -0700 (PDT) Received: from minerva.redhat.com ([90.168.169.92]) by smtp.gmail.com with ESMTPSA id u1sm28276092wru.90.2019.10.22.01.48.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 22 Oct 2019 01:48:18 -0700 (PDT) From: Javier Martinez Canillas To: grub-devel@gnu.org Cc: Vladimir Serbinenko , Daniel Kiper , Paulo Flabiano Smorigo , Javier Martinez Canillas Subject: [PATCH v3 0/5] Search for specific config files using UUID, MAC and IP Date: Tue, 22 Oct 2019 10:48:09 +0200 Message-Id: <20191022084814.8071-1-javierm@redhat.com> X-Mailer: git-send-email 2.21.0 MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 209.132.183.28 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 22 Oct 2019 08:48:24 -0000 Hello, This is a v3 of a series that have been carried in Fedora (and other dist= ros) for a long time. It allows to fetch GRUB configurations that are customiz= ed to each machine by using the client UUID, MAC and IP as grub.cfg suffixes= . 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 mo= re similar to printf() and not require to use %x plus grub_toupper(). Patch #2 is just a cleanup of the bootp/dhcp options enum to consistently= use hexadecimal numbers for all the values. Patch #3 sets net__client{id,uuid} environment variables by us= ing the DHCP client ID and UUID options if these are found. Patch #4 adds the support to fetch the config files using the UUID, MAC a= nd IP as suffixes. If these aren't found, the default GRUB config filename is u= sed as a fallback. Patch #5 adds documentation that specifies the order netboot clients use = to select a grub configuration file. Best regards, Javier Changes in v3: - Add patch to cleanup bootp/dhcp options enum. - Add Reviewed-by tag from Daniel Kiper. - Add a patch documenting the grub.cfg netboot selection order. 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= . Javier Martinez Canillas (1): net/dhcp: Consistently use hexadecimal numbers for options enum Paulo Flabiano Smorigo (3): Add %X option to printf functions net/dhcp: Set net__client{id,uuid} variables from DHCP options normal/main: Search for specific config files for netboot Robert Marshall (1): docs: Update info with grub.cfg netboot selection order docs/grub.texi | 42 +++++++++++++++ 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 | 19 ++++--- 6 files changed, 229 insertions(+), 21 deletions(-) --=20 2.21.0