From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from list by lists.gnu.org with archive (Exim 4.71) id 1T98dW-0008SB-27 for mharc-grub-devel@gnu.org; Wed, 05 Sep 2012 01:58:50 -0400 Received: from eggs.gnu.org ([208.118.235.92]:49668) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T98dT-0008Pu-3T for grub-devel@gnu.org; Wed, 05 Sep 2012 01:58:48 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1T98dR-0001MS-VJ for grub-devel@gnu.org; Wed, 05 Sep 2012 01:58:47 -0400 Received: from mail-we0-f169.google.com ([74.125.82.169]:56653) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1T98dR-0001Jq-PH for grub-devel@gnu.org; Wed, 05 Sep 2012 01:58:45 -0400 Received: by mail-we0-f169.google.com with SMTP id s10so128842wey.0 for ; Tue, 04 Sep 2012 22:58:45 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:x-enigmail-version:content-type; bh=kwHQG+RjhFFQ5Hk65bhGeUfiBkOUsffTzqp11njoASs=; b=XZ2OspSLYNzPdXo5VMmX8wOc8FE0JDHA+hf+9vQUYBrAXZ1q8reaSVAPK2mhHAMpSX awlI8HdogZ1aMrjH3AkKmugE60RQCdtKJtNfquW3xMYNGwTJYA2/t616byHBg2DiZQba c/028gLoPUvcTM0ktEpZRvoH7VRyLL7rEVWuuxSwgZpoQh9thexlROGDbeIO2ZmXkk2b NcGhErJDgYiikjY70dh/omK1ovsFRvEkreq76txl/ZuEh1qoNR7DM1LYsP8rhtXUmI4c zuLq+cLb8XDRtuvKOeuOmb6a32wMuupP2wov8iXubtqkBGLUDjrqWAvL+01vt0e7NkIP Nx8g== Received: by 10.217.2.133 with SMTP id p5mr13083387wes.143.1346824725287; Tue, 04 Sep 2012 22:58:45 -0700 (PDT) Received: from debian.x201.phnet (51-233.197-178.cust.bluewin.ch. [178.197.233.51]) by mx.google.com with ESMTPS id fu8sm27459876wib.5.2012.09.04.22.58.43 (version=TLSv1/SSLv3 cipher=OTHER); Tue, 04 Sep 2012 22:58:44 -0700 (PDT) Message-ID: <5046EA0F.7010006@gmail.com> Date: Wed, 05 Sep 2012 07:58:39 +0200 From: =?UTF-8?B?VmxhZGltaXIgJ8+GLWNvZGVyL3BoY29kZXInIFNlcmJpbmVua28=?= User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:10.0.6esrpre) Gecko/20120817 Icedove/10.0.6 MIME-Version: 1.0 To: grub-devel@gnu.org Subject: Re: [PATCH 2/2] Search for specific config file when it boots from tftp References: <20120814085705.Horde.Xz_m5pir309QKkshWJ9CW4A@imap.linux.ibm.com> In-Reply-To: <20120814085705.Horde.Xz_m5pir309QKkshWJ9CW4A@imap.linux.ibm.com> X-Enigmail-Version: 1.4.1 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="------------enigF5C16419217EB444C846BADC" X-detected-operating-system: by eggs.gnu.org: Genre and OS details not recognized. X-Received-From: 74.125.82.169 X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list Reply-To: The development of GNU GRUB List-Id: The development of GNU GRUB List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 05 Sep 2012 05:58:48 -0000 This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigF5C16419217EB444C846BADC Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On 14.08.2012 14:57, Paulo Flabiano Smorigo/Brazil/IBM wrote: >=20 > Hi all, >=20 > 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: >=20 > 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. >=20 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. --=20 Regards Vladimir '=CF=86-coder/phcoder' Serbinenko --------------enigF5C16419217EB444C846BADC Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.12 (GNU/Linux) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/ iF4EAREKAAYFAlBG6g8ACgkQNak7dOguQgkbswD+I9HGrgswtVB0kIfFHXlXdq2Z 4Hwwy9J85hLb5U8ZecQA/jmKNKGIlYhMmD+2/0b7rysDocgrz9b6cJn0Qr5fkSQP =PtE1 -----END PGP SIGNATURE----- --------------enigF5C16419217EB444C846BADC--