Documentation ¶
Index ¶
- Variables
- func ApplyNetplan(chroot string) error
- func DHCPClient() error
- func EnableLVM() error
- func GetMAC() (string, error)
- func GrowLVMRoot(drive, volume string, partition int) error
- func Halt()
- func PartProbe(device string) error
- func PowerOff()
- func Reboot()
- func Shell()
- func Suspend()
- func Wipe(device string) error
- func WriteNetPlan(chroot string, cfg *types.BootyConfig) error
- type Device
- type Devices
- type Ethernets
- type Mount
- type Mounts
- type Netplan
Constants ¶
This section is empty.
Variables ¶
var LeasedAddress string
LeasedAddress is the currently leased address
Functions ¶
func ApplyNetplan ¶
ApplyNetplan - this will be done through an /etc/rc.local (TODO)
func GrowLVMRoot ¶
GrowLVMRoot will grow the root filesystem
func Suspend ¶
func Suspend()
Suspend will instruct the CPU to enter a suspended state (no-power off (usually))
func WriteNetPlan ¶
func WriteNetPlan(chroot string, cfg *types.BootyConfig) error
WriteNetPlan - will write a netplan to disk
Types ¶
type Device ¶
type Device struct { // Create the device within the ramdisk CreateDevice bool // Configuration for the device Name string Path string Mode uint32 Major int64 Minor int64 }
Device contains the configuration for a single device within the initramfs
type Devices ¶
type Devices struct {
Device []Device
}
Devices are the devices that can be created on boot
type Ethernets ¶
type Ethernets struct { Match struct { Macaddress string `yaml:"macaddress,omitempty"` } `yaml:"match,omitempty"` Addresses []string `yaml:"addresses,omitempty"` Dhcp4 bool `yaml:"dhcp4"` Optional bool `yaml:"optional,omitempty"` SetName string `yaml:"set-name,omitempty"` Gateway4 string `yaml:"gateway4,omitempty"` Nameservers struct { Search []string `yaml:"search,omitempty"` Addresses []string `yaml:"addresses,omitempty"` } `yaml:"nameservers,omitempty"` }
Ethernets defines a connection
type Mount ¶
type Mount struct { // Create the location on disk CreateMount bool // Enable the mount Source -> Path w/options EnableMount bool // Configurations Name string Source string Path string Mode os.FileMode FSType string Flags uintptr Options string }
Mount contains the configuration for a single mount within the initramfs
type Mounts ¶
type Mounts struct {
Mount []Mount
}
Mounts are the paths that can be mounted or created on boot
func MountRootVolume ¶
MountRootVolume - will create a mountpoint and mount the root volume
func (*Mounts) MountNamed ¶
MountNamed -
func (*Mounts) UnMountAll ¶
UnMountAll - will unmount all partitions
func (*Mounts) UnMountNamed ¶
UnMountNamed - will unmount a partition