Documentation ¶
Overview ¶
Package syslinux implements a syslinux config file parser.
See http://www.syslinux.org/wiki/index.php?title=Config for general syslinux config features.
Currently, only the APPEND, INCLUDE, KERNEL, LABEL, DEFAULT, and INITRD directives are partially supported.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // ErrDefaultEntryNotFound is returned when the configuration file // names a default label that is not part of the configuration. ErrDefaultEntryNotFound = errors.New("default label not found in configuration") )
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { // Entries is a map of label name -> label configuration. Entries map[string]*boot.LinuxImage // DefaultEntry is the default label key to use. // // If DefaultEntry is non-empty, the label is guaranteed to exist in // `Entries`. DefaultEntry string }
Config encapsulates a parsed Syslinux configuration file.
See http://www.syslinux.org/wiki/index.php?title=Config for the configuration file specification.
func ParseConfigFile ¶
ParseConfigFile parses a Syslinux configuration as specified in http://www.syslinux.org/wiki/index.php?title=Config
Currently, only the APPEND, INCLUDE, KERNEL, LABEL, DEFAULT, and INITRD directives are partially supported.
urlfetch.DefaultSchemes is used to fetch any files that must be parsed or provided.
`wd` is the default scheme, host, and path for any files named as a relative path - e.g. kernel, include, and initramfs paths are requested relative to the wd. The default path for config files is assumed to be `wd.Path`/pxelinux.cfg/.