From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MylRZ-00011l-Li for mharc-grub-devel@gnu.org; Fri, 16 Oct 2009 07:58:01 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MylRV-000111-Jc for grub-devel@gnu.org; Fri, 16 Oct 2009 07:57:57 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MylRO-0000wv-TR for grub-devel@gnu.org; Fri, 16 Oct 2009 07:57:55 -0400 Received: from [199.232.76.173] (port=47411 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MylRO-0000wd-NV for grub-devel@gnu.org; Fri, 16 Oct 2009 07:57:50 -0400 Received: from mail-fx0-f228.google.com ([209.85.220.228]:61513) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MylRO-0006aw-8l for grub-devel@gnu.org; Fri, 16 Oct 2009 07:57:50 -0400 Received: by fxm28 with SMTP id 28so2287398fxm.42 for ; Fri, 16 Oct 2009 04:57:49 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:received:received:message-id:date:from :user-agent:mime-version:to:subject:references:in-reply-to :content-type:content-transfer-encoding; bh=KgjdkPVfO65yXPUAjWU2SWvFZ8dMYu9U9fEehJHY+d0=; b=Z0rUtk62OvZs/PIciCzihbcvZWlMtQRN4poV5gjn2h4FzSXgfoaG4TpVwvftQ5kpXn RKvlBAXjeU3tqWNpcsnm9jVXJV207Avht7RWc8cWwYLL4QoiGapru+cN0OKReA/SyHBo XY8/fyLPd1UOQ+0uWHTwA7qoIexg+jBJZn/iQ= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:date:from:user-agent:mime-version:to:subject:references :in-reply-to:content-type:content-transfer-encoding; b=nnEDDhoAf1WOUxStovEQbbVPPw6+K92hobq0m5hVb0A64+8L8w+qHXq8dZKObrzNx3 Vo7uQKxDaRuSxO18xJU3G7vhKUNGRGm/+6awIqUyE89TM0szjb3EFC9aV7CATcH7XYoi y1aAJMGcc2ASX/9JhlKwI4cqKvCuojg7BEahQ= Received: by 10.204.2.211 with SMTP id 19mr1249937bkk.6.1255694269272; Fri, 16 Oct 2009 04:57:49 -0700 (PDT) Received: from debian.bg45.phnet (hg-public-dock-129-dhcp.ethz.ch [82.130.80.129]) by mx.google.com with ESMTPS id d6sm1599452fga.5.2009.10.16.04.57.48 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 16 Oct 2009 04:57:48 -0700 (PDT) Message-ID: <4AD85FBB.6010507@gmail.com> Date: Fri, 16 Oct 2009 13:57:47 +0200 From: Vladimir 'phcoder' Serbinenko User-Agent: Mozilla-Thunderbird 2.0.0.22 (X11/20090701) MIME-Version: 1.0 To: The development of GRUB 2 References: In-Reply-To: Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: Using network informations from PXE as grub2 enviroment variables X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 16 Oct 2009 11:57:57 -0000 Aleš Kapica wrote: > Dear friends, > > You have missunderstood my previous post from Thu, 15 Oct 2009 > 08:52:01 +0200 when I post patch, which fixies problem with > identification of the booting machine in network by IP address. > The following discussion have nothing to do with my post. I want to > clarify porpose of my patch. > > Nobody can't use options 150 from DHCP, because GRUB2 don't have any > driver for network adapters. Network task are done only through > adapters PXE firmware. PXE passes informations only about IP > addresses, but no DHCP options. > I let someone more familiar with PXE than me to answer this. > In current state these informations is possible only to list, that > means that they aren't a part of the grubs environment. > My patch solve this. Now is this possible to set PXE informations as > grubs environment variables, and use in them in grub.cfg for > identification of the booting machine. > > Is there any problem with adding of my patch? > I've looked into your first patch. The idea is good however patch has some problems: 1) Don't hardcode array sizes. Use sizeof ("XXX.XXX.XXX.XXX") instead 2) Exporting variables shouldn't require user to run a command. Just export them as soon as possible (e.g. on module load) 3) "your_ip" is problematic name. I would prefer "local_ip" and "remote_ip" > Aleš Kapica > > ------------------------------------------------------------------------ > > _______________________________________________ > Grub-devel mailing list > Grub-devel@gnu.org > http://lists.gnu.org/mailman/listinfo/grub-devel > -- Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git