From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Subject: Re: [PATCH 2/2] Search for specific config file when it boots from tftp
Date: Wed, 05 Sep 2012 07:58:39 +0200 [thread overview]
Message-ID: <5046EA0F.7010006@gmail.com> (raw)
In-Reply-To: <20120814085705.Horde.Xz_m5pir309QKkshWJ9CW4A@imap.linux.ibm.com>
[-- Attachment #1: Type: text/plain, Size: 951 bytes --]
On 14.08.2012 14:57, Paulo Flabiano Smorigo/Brazil/IBM wrote:
>
> Hi all,
>
> This patch implements a search for a specific configuration (based on
> MAC or IP) when the config file is on the tftp server. He uses the
> following order:
>
> 1) By MAC address (in lower case hexadecimal with dash separators);
> 2) By IP (in upper case hexadecimal). It removes one hex digit from
> the end and try again;
> 3) The original grub.cfg file.
>
This seems more like something that should be done in grub.cfg.
Something more along the lines:
if [ -s "$prefix/grub.cfg.$mac" ]; then
source "$prefix/grub.cfg.$mac"
exit_file
fi
for i in 8 7 6 5 4 3 2 1; do
if [ -s "$prefix/grub.cfg.${ip:1:$i}" ]; then
source "$prefix/grub.cfg.${ip:1:$i}"
exit_file
fi
It seems like this would be more productive than just handling this
specific case manually in C.
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
prev parent reply other threads:[~2012-09-05 5:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-08-14 12:57 [PATCH 2/2] Search for specific config file when it boots from tftp Paulo Flabiano Smorigo/Brazil/IBM
2012-09-05 5:58 ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=5046EA0F.7010006@gmail.com \
--to=phcoder@gmail.com \
--cc=grub-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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.