[syslinux] constants and line continuation

Dag Wieers dag at wieers.com
Tue Jul 13 07:21:31 PDT 2010


On Tue, 13 Jul 2010, Jim Cromie wrote:

> On Fri, Jul 9, 2010 at 3:22 PM, H. Peter Anvin <hpa at zytor.com> wrote:
>> On 07/09/2010 12:40 PM, Warren Block wrote:
>>> If these are FAQ entries, sorry, I searched but did not find.
>>> Maybe the wrong terms.
>>>
>>> Is there a way to define a constant value in a pxelinux.cfg/default
>>> file?
>>>
>>>    httphost=192.168.1.1
>>>    ...
>>>    append fetch=http://${httphost}/...
>>>
>>> Line continuations: it would be slick if multiple append statements
>>> could be used in a single menu entry, breaking up those four-screen-wide
>>> lines.  Tried that, and backslashes, but no.
>>
>> Not supported in the current version, sorry, but it will happen eventually.
>
> is this a good application for lua ?
>
> if lua is 'ready' when the config is requested and downloaded,
> the file could contain lua code that is run to produce all the
> menus, kernels, append-lines etc.

Yes, my preference would be to allow for a syslinux.lua instead of a 
syslinux.conf that would replace the syslinux.conf.

That way you can make the menu entries and boot-options depend on:

  - system information (DMI, VPD, PCI, HDD, filesystem labels, HDT info)
  - boot conditions (eg. boot-device, syslinux version, ...)
  - ask for certain information from the user

In previous projects it would have been invaluable for projects. If for 
provisioning you have more information you can act on at that stage, you 
don't need to modify original vendor-supplied boot-images. Or you can 
automatically have syslinux follow a work-flow like:

  - check if I see more than one HD to make RAID and reboot
  - perform network connectivity and hardware validation tests and reboot
  - perform OS installation

Especially if we can set and read state information (maybe using VPD or 
MBR), each of the steps could update the state to influence what needs to 
happen next.

Of course there are other ways to achieve the above, but on the fly 
generation of the config file offers a lot of potential.

-- 
--   dag wieers,  dag at wieers.com,  http://dag.wieers.com/   --
[Any errors in spelling, tact or fact are transmission errors]


More information about the Syslinux mailing list