From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.90_1) id 1iGWJd-0000fl-A0 for mharc-grub-devel@gnu.org; Fri, 04 Oct 2019 18:44:49 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:48792) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1iGWJa-0000fB-Dt for grub-devel@gnu.org; Fri, 04 Oct 2019 18:44:47 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1iGWJY-0004jd-UL for grub-devel@gnu.org; Fri, 04 Oct 2019 18:44:45 -0400 Received: from mx1.redhat.com ([209.132.183.28]:47804) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1iGWJY-0004jY-PF for grub-devel@gnu.org; Fri, 04 Oct 2019 18:44:44 -0400 Received: from mail-wm1-f69.google.com (mail-wm1-f69.google.com [209.85.128.69]) (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 A2D9385360 for ; Fri, 4 Oct 2019 22:44:43 +0000 (UTC) Received: by mail-wm1-f69.google.com with SMTP id q9so3243504wmj.9 for ; Fri, 04 Oct 2019 15:44:43 -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=564P/Hn5eMp6GBNNcgZ87jtsatJw2S4u7YsLfltUC2k=; b=nDwZsV0+uJFBK7aAca4wIa7SUM64A1wV2CU4pLuz/BBM2PrXQjWKvEaeI449ZFnxa4 k+Sf4lyCsP0SpX7I4Lw1BlhBfWwYB7ve3aAmdbi0I8+/jaXpkS0PbEup5wunqrY9+xND GYD3TMBSHJwfOzySoIjcMXH/rO/giNQ7FnENqdn0QjZF5516GCxiAe8eNgcVNwTWhVrz 8iWMjk5VLLaL6wvMBsXgJv5EgPQ6KVKi6gNup63hV/epWT8ZGXDE86V86e8lFPlE12/S cUh9Q+HEkeAeID2l6R+u21HKw3DqXCdVCQO7a9Gpkwu2zSqoi+pEWqM48SL3UsskqwLz IZEw== X-Gm-Message-State: APjAAAWMzXKjEPVJAi5MlXQIa/DEEtqj4C5441Qw7VL6yS6UVaP2h9LA ZNecUqPfTOQMJ+/7+2w/b1TieHpIz9nW8JI+ykQ5Vp7anpakrB0E6accn6GJQmRRVSRc3kDflAq 9h+8V6syU2e8= X-Received: by 2002:adf:eb4d:: with SMTP id u13mr3181573wrn.224.1570229081981; Fri, 04 Oct 2019 15:44:41 -0700 (PDT) X-Google-Smtp-Source: APXvYqySsVKOZUPxu0TimUfdU+fm+8bYg97Kq1lBaSV5IJ27OJZsgh/6lg+JuVpHH0SFz2ZDH0JBaQ== X-Received: by 2002:adf:eb4d:: with SMTP id u13mr3181563wrn.224.1570229081720; Fri, 04 Oct 2019 15:44:41 -0700 (PDT) Received: from minerva.home ([90.168.169.92]) by smtp.gmail.com with ESMTPSA id a204sm13033256wmh.21.2019.10.04.15.44.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Oct 2019 15:44:41 -0700 (PDT) From: Javier Martinez Canillas To: grub-devel@gnu.org Cc: Vladimir Serbinenko , Daniel Kiper , Paulo Flabiano Smorigo , Javier Martinez Canillas Subject: [PATCH 0/3] Search for specific config files using UUID, MAC and IP Date: Sat, 5 Oct 2019 00:44:24 +0200 Message-Id: <20191004224427.22480-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: Fri, 04 Oct 2019 22:44:47 -0000 Hello, This series contains some patches 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. This procedure is similar to what is used by pxelinux and yaboot: http://www.syslinux.org/wiki/index.php/PXELINUX#config Patch #1 sets net__client{id,uuid} environment variables by using the DHCP client ID and UUID options if these are found. Patch #2 adds a %X format specifier to make the grub_printf() function more similar to printf() and not require to use %x plus grub_toupper(). 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 Paulo Flabiano Smorigo (3): Set net__client{id,uuid} variables from DHCP options Add %X option to printf functions Search for specific config files for netboot grub-core/kern/misc.c | 7 ++- grub-core/net/bootp.c | 85 ++++++++++++++++++++++++++--- grub-core/net/net.c | 117 ++++++++++++++++++++++++++++++++++++++++ grub-core/normal/main.c | 17 ++++-- include/grub/net.h | 5 ++ 5 files changed, 217 insertions(+), 14 deletions(-) --=20 2.21.0