From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MyohU-0002Wx-6F for mharc-grub-devel@gnu.org; Fri, 16 Oct 2009 11:26:40 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MyohS-0002Tg-1f for grub-devel@gnu.org; Fri, 16 Oct 2009 11:26:38 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MyohN-0002My-3p for grub-devel@gnu.org; Fri, 16 Oct 2009 11:26:37 -0400 Received: from [199.232.76.173] (port=55698 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MyohM-0002Mc-L5 for grub-devel@gnu.org; Fri, 16 Oct 2009 11:26:32 -0400 Received: from mail-ew0-f228.google.com ([209.85.219.228]:62155) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MyohM-0007vE-BI for grub-devel@gnu.org; Fri, 16 Oct 2009 11:26:32 -0400 Received: by ewy28 with SMTP id 28so2138746ewy.42 for ; Fri, 16 Oct 2009 08:26:30 -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=u3PIOHqIlb1S4gViMtX2I1hur/16IGpm4UC96r6JQeE=; b=Qavx1FN1LQ7sk5Dha0GNyW1ycNsA8fF9c+poNWDfeHjA2nsZSLfFaT2el5CclfAtPT hdyo7sw+gtBnHHcs6cbSqAsxvHjgTYe8nHm716uDGQjFNPxYakBFdNaU4sH2H5Jm5dq/ Trv2YHCObbi9FNeszZ2DEswDHfo6savqKpgn0= 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=tq6oljKK0IncaoE/8AqWfS8WrYHH36nj38IlPavMavo8/2DBY8F5m2LcRxY00hLrE2 +JbXIb04TrtjVzSHBNsQQr6B4yWMuS68M7TyZBwUsA4EbxZzOabNt6rwOwUkoD/VVpW5 6VgRpi1LBxiA4tcTpXIg0WQBeigitHg8zAUcQ= Received: by 10.211.130.13 with SMTP id h13mr1103378ebn.81.1255706790602; Fri, 16 Oct 2009 08:26:30 -0700 (PDT) Received: from debian.bg45.phnet (gprs37.swisscom-mobile.ch [193.247.250.37]) by mx.google.com with ESMTPS id 7sm5321507eyb.40.2009.10.16.08.26.28 (version=TLSv1/SSLv3 cipher=RC4-MD5); Fri, 16 Oct 2009 08:26:29 -0700 (PDT) Message-ID: <4AD8909E.4080207@gmail.com> Date: Fri, 16 Oct 2009 17:26:22 +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: 7bit X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: Re: [GITGRUB] Support PXE option and new command pxecfg 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 15:26:38 -0000 Hello. Could you send this as a patch? Bean wrote: > Hi, > > Extends pxe command: > > -i (--info) now shows mac and dhcp options > -e (--export) export a dhcp option as grub variable, for example: > > pxe -e 150 > > Why can't this be exported unconditionally on pxe system startup? > Set variable PXE_150 to the value of dhcp option 150, you can then use > command like source to load it: > > source ${PXE_150} > > New command pxecfg, which allows you to run a command based on current ip/mac: > > pxecfg /pxe.txt > > What's wrong with standard if? I would prefer to extend "if" if necessary rather than having ad-hoc command for every condition (later is inexpandable) > Here is an example config file: > > pxe { > ip { > 192 { > 168.2 { > command = "echo ip 192.168.2.*" > } > > 169 { > command = "echo ip 192.169.*.*" > } > > command = "echo ip 192.*.*.*" > } > } > > mac { > 00-0c-29-1a { > command = "echo mac 00-0c-29-1a-*-*" > } > > command = "echo mac *-*-*-*-*-*" > } > } > > The config file should be self-explaining, you can use \n to specify > multiple line of commands: > > command = "linux /vmlinuz\ninitrd /initrd\nboot" > > Source is at http://github.com/bean123/grub/, master branch. > > -- Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git