configs

package
v0.0.0-...-3bda7ca Latest Latest
Warning

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

Go to latest
Published: Apr 2, 2024 License: MIT Imports: 12 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(conffile, sysfile string) string

Copy a file to the system, make sure you have run command.Elevate() recently

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()

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()

This function writes a dracut configuration file for /etc/dracut.conf.d/

func Set_Grub2

func Set_Grub2() ([]string, error)

This function copies our config to /etc/default/grub and updates grub

func Set_Grubby

func Set_Grubby() string

Configures grub2 and/or systemd-boot using grubby

func Set_KernelStub

func Set_KernelStub() string

Configures systemd-boot using kernelstub

func Set_Mkinitcpio

func Set_Mkinitcpio()

This function 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
}

func GetConfig

func GetConfig() *Config

Gets all the configs and returns the struct

type Path

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

func GetConfigPaths

func GetConfigPaths() *Path

Gets 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