[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 2/2] Search for specific config file when it boots from tftp
From: |
Vladimir 'φ-coder/phcoder' Serbinenko |
Subject: |
Re: [PATCH 2/2] Search for specific config file when it boots from tftp |
Date: |
Wed, 05 Sep 2012 07:58:39 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120817 Icedove/10.0.6 |
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
signature.asc
Description: OpenPGP digital signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- Re: [PATCH 2/2] Search for specific config file when it boots from tftp,
Vladimir 'φ-coder/phcoder' Serbinenko <=