configs

package
v0.0.0-...-4f51fd5 Latest Latest
Warning

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

Go to latest
Published: Sep 8, 2024 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Configure_Grub2

func Configure_Grub2()

func CopyToSystem

func CopyToSystem(isRoot bool, conffile, sysfile string)

CopyToSystem copies a file to the system.

func DisableVFIOVideo

func DisableVFIOVideo(i int)

This function adds the disable vfio video output on host option to the config The function will use the given int as the value for the option

func GenerateVBIOSDumper

func GenerateVBIOSDumper(vbios_path string)

Generates a script file named dump_vbios.sh and places it inside the utils folder. This script has to be run without a display manager or display server running

func InitConfigs

func InitConfigs()

InitConfigs constructs the empty config files and folders based on what exists on the system

func Set_Cmdline

func Set_Cmdline(gpu_IDs []string)

This function adds the default kernel arguments we want to the config/cmdline file This gives us a file we can read all the kernel arguments this system needs in case of an unknown bootloader

func Set_Dracut

func Set_Dracut()

Set_Dracut writes a dracut configuration file for `/etc/dracut.conf.d/`.

func Set_Grub2

func Set_Grub2(isRoot bool) error

Set_Grub2 copies our config to /etc/default/grub and updates grub

func Set_Grubby

func Set_Grubby(isRoot bool) string

Set_Grubby configures grub2 and/or systemd-boot using grubby

func Set_KernelStub

func Set_KernelStub(isRoot bool)

Set_KernelStub configures systemd-boot using kernelstub.

func Set_Mkinitcpio

func Set_Mkinitcpio()

Set_Mkinitcpio copies the content of /etc/mkinitcpio.conf to the config folder and does an inline replace/insert on the MODULES=() line

func Set_Modprobe

func Set_Modprobe(gpu_IDs []string)

This function generates a modprobe file for /etc/modprobe.d/

Types

type Config

type Config struct {
	Bootloader string
	Cpuvendor  string
	Path       *Path
	Gpu_Group  string
	Gpu_IDs    []string
	IsRoot     bool
}

func GetConfig

func GetConfig() *Config

GetConfig retrieves all the configs and returns the struct.

type Path

type Path struct {
	CMDLINE    string
	MODPROBE   string
	INITRAMFS  string
	ETCMODULES string
	DEFAULT    string
	QEMU       string
	DRACUT     string
	MKINITCPIO string
}

func GetConfigPaths

func GetConfigPaths() *Path

GetConfigPaths retrieves the path to all the config files.

Jump to

Keyboard shortcuts

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