syslinux

package
v0.0.0-...-ed07a65 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 19, 2019 License: BSD-3-Clause Imports: 10 Imported by: 0

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

View Source
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

func ParseConfigFile(url string, wd *url.URL) (*Config, error)

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/.

func ParseConfigFileWithSchemes

func ParseConfigFileWithSchemes(s urlfetch.Schemes, url string, wd *url.URL) (*Config, error)

ParseConfigFileWithSchemes is like ParseConfigFile, but uses the given schemes explicitly.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL