Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1Myo3S-0003Tk-2v for mharc-grub-devel@gnu.org; Fri, 16 Oct 2009 10:45:18 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1Myo3P-0003SH-6V for grub-devel@gnu.org; Fri, 16 Oct 2009 10:45:15 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1Myo3K-0003QU-1A for grub-devel@gnu.org; Fri, 16 Oct 2009 10:45:14 -0400 Received: from [199.232.76.173] (port=60813 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1Myo3J-0003QO-Qe for grub-devel@gnu.org; Fri, 16 Oct 2009 10:45:09 -0400 Received: from mail-px0-f191.google.com ([209.85.216.191]:40885) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1Myo3J-00015z-Dc for grub-devel@gnu.org; Fri, 16 Oct 2009 10:45:09 -0400 Received: by pxi29 with SMTP id 29so1682962pxi.14 for ; Fri, 16 Oct 2009 07:45:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:date:message-id:subject :from:to:content-type; bh=+uxeJ3m2mIE9IlzK3GWzv9VcKB9S17X3X6vwbPKql5Y=; b=kZFCI9s+V7pF3SSl86d2gEPsH7pIL80sOY/xuUiPAximsBLQD9Um5bTAf5vTg+mTEq r/UO3W0qqFuSEXFb2Eo1+7ej4s23r6S2mQ1MMtvO3NtPfkiNGMOthkqZ+atYg2lE+Qd1 Q/i7bvA0XFjqouKjsNHMwRVZ52w2/P9b81CoI= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:date:message-id:subject:from:to:content-type; b=k+4MPfcK+kaJIxrlTIYhbRIw39l4y88iaPZC5TCkSd231ltjd7FHPMfhofJeZKTCVY OBIKqCv+7uPjDwXerVvnIeZngXynvh1OT01V0r5QZ3QnZ6ef9tHw1X9mYKOOuPQ0qdtR bWuMsHCxqx3C1Q7gyMw2pQWjRdw5gRKpE+0J0= MIME-Version: 1.0 Received: by 10.140.174.8 with SMTP id w8mr61355rve.133.1255704308113; Fri, 16 Oct 2009 07:45:08 -0700 (PDT) Date: Fri, 16 Oct 2009 22:45:08 +0800 Message-ID: From: Bean To: The development of GRUB 2 Content-Type: text/plain; charset=ISO-8859-1 X-detected-operating-system: by monty-python.gnu.org: GNU/Linux 2.6 (newer, 2) Subject: [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 14:45:15 -0000 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 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 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. -- Bean gitgrub home: http://github.com/grub/grub/ my fork page: http://github.com/bean123/grub/