All of lore.kernel.org
 help / color / mirror / Atom feed
* [GITGRUB] Support PXE option and new command pxecfg
@ 2009-10-16 14:45 Bean
  2009-10-16 15:26 ` Vladimir 'phcoder' Serbinenko
  2009-10-16 18:38 ` Robert Millan
  0 siblings, 2 replies; 12+ messages in thread
From: Bean @ 2009-10-16 14:45 UTC (permalink / raw)
  To: The development of GRUB 2

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/



^ permalink raw reply	[flat|nested] 12+ messages in thread

end of thread, other threads:[~2009-10-20 10:51 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-10-16 14:45 [GITGRUB] Support PXE option and new command pxecfg Bean
2009-10-16 15:26 ` Vladimir 'phcoder' Serbinenko
2009-10-16 16:13   ` Bean
2009-10-16 16:47     ` Vladimir 'phcoder' Serbinenko
2009-10-16 17:20       ` Bean
2009-10-16 17:30         ` Vladimir 'phcoder' Serbinenko
2009-10-16 21:05           ` Felix Zielcke
2009-10-16 21:13           ` Robert Millan
2009-10-19  9:02             ` Bean
2009-10-20 10:21               ` Robert Millan
2009-10-20 10:51                 ` Bean
2009-10-16 18:38 ` Robert Millan

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.