Tidy up debug.log formating
This commit is contained in:
parent
c5ba1a80ab
commit
b3c17b6f90
4 changed files with 7 additions and 7 deletions
|
@ -79,7 +79,7 @@ func Set_KernelStub() string {
|
||||||
kernel_args := fileio.ReadFile(config.Path.CMDLINE)
|
kernel_args := fileio.ReadFile(config.Path.CMDLINE)
|
||||||
|
|
||||||
// Write to logger
|
// Write to logger
|
||||||
logger.Printf("Running command:\nsudo kernelstub -a \"%s\"", kernel_args)
|
logger.Printf("Running command:\nsudo kernelstub -a \"%s\"\n", kernel_args)
|
||||||
|
|
||||||
// Run the command
|
// Run the command
|
||||||
_, err := command.Run("sudo", "kernelstub", "-a", kernel_args)
|
_, err := command.Run("sudo", "kernelstub", "-a", kernel_args)
|
||||||
|
@ -98,7 +98,7 @@ func Set_Grubby() string {
|
||||||
kernel_args := fileio.ReadFile(config.Path.CMDLINE)
|
kernel_args := fileio.ReadFile(config.Path.CMDLINE)
|
||||||
|
|
||||||
// Write to logger
|
// Write to logger
|
||||||
logger.Printf("Running command:\nsudo grubby --update-kernel=ALL --args=\"%s\"", kernel_args)
|
logger.Printf("Running command:\nsudo grubby --update-kernel=ALL --args=\"%s\"\n", kernel_args)
|
||||||
|
|
||||||
// Run the command
|
// Run the command
|
||||||
_, err := command.Run("sudo", "grubby", "--update-kernel=ALL", fmt.Sprintf("--args=%s", kernel_args))
|
_, err := command.Run("sudo", "grubby", "--update-kernel=ALL", fmt.Sprintf("--args=%s", kernel_args))
|
||||||
|
@ -135,7 +135,7 @@ func Configure_Grub2() {
|
||||||
grub_content := fileio.ReadLines(sysfile)
|
grub_content := fileio.ReadLines(sysfile)
|
||||||
|
|
||||||
// Write to logger
|
// Write to logger
|
||||||
logger.Printf("Read %s:\n%s", sysfile, strings.Join(grub_content, "\n"))
|
logger.Printf("Read %s:\n%s\n", sysfile, strings.Join(grub_content, "\n"))
|
||||||
|
|
||||||
for _, line := range grub_content {
|
for _, line := range grub_content {
|
||||||
if currentargs_re.MatchString(line) {
|
if currentargs_re.MatchString(line) {
|
||||||
|
|
|
@ -22,7 +22,7 @@ func Set_Dracut() {
|
||||||
}
|
}
|
||||||
|
|
||||||
// Write to logger
|
// Write to logger
|
||||||
logger.Printf("Writing to %s:\nadd_drivers+=\" %s \"", dracutConf, strings.Join(vfio_modules(), " "))
|
logger.Printf("Writing to %s:\nadd_drivers+=\" %s \"\n", dracutConf, strings.Join(vfio_modules(), " "))
|
||||||
|
|
||||||
// Write the dracut config file
|
// Write the dracut config file
|
||||||
fileio.AppendContent(fmt.Sprintf("add_drivers+=\" %s \"\n", strings.Join(vfio_modules(), " ")), dracutConf)
|
fileio.AppendContent(fmt.Sprintf("add_drivers+=\" %s \"\n", strings.Join(vfio_modules(), " ")), dracutConf)
|
||||||
|
|
|
@ -33,7 +33,7 @@ func Set_Mkinitcpio() {
|
||||||
mkinitcpio_content := fileio.ReadLines(sysfile)
|
mkinitcpio_content := fileio.ReadLines(sysfile)
|
||||||
|
|
||||||
// Write to logger
|
// Write to logger
|
||||||
logger.Printf("Read %s:\n%s", sysfile, strings.Join(mkinitcpio_content, "\n"))
|
logger.Printf("Read %s:\n%s\n", sysfile, strings.Join(mkinitcpio_content, "\n"))
|
||||||
|
|
||||||
for _, line := range mkinitcpio_content {
|
for _, line := range mkinitcpio_content {
|
||||||
// If we are at the line starting with MODULES=
|
// If we are at the line starting with MODULES=
|
||||||
|
@ -47,7 +47,7 @@ func Set_Mkinitcpio() {
|
||||||
// If vendor-reset is in the current modules
|
// If vendor-reset is in the current modules
|
||||||
if strings.Contains(line, "vendor-reset") {
|
if strings.Contains(line, "vendor-reset") {
|
||||||
// Write to logger
|
// Write to logger
|
||||||
logger.Printf("vendor-reset module detected in %s\nMaking sure it will be loaded before vfio", sysfile)
|
logger.Printf("vendor-reset module detected in %s\nMaking sure it will be loaded before vfio\n", sysfile)
|
||||||
|
|
||||||
// Add vendor-reset first
|
// Add vendor-reset first
|
||||||
modules = append([]string{"vendor-reset"}, modules...)
|
modules = append([]string{"vendor-reset"}, modules...)
|
||||||
|
|
|
@ -22,7 +22,7 @@ func Set_Modprobe(gpu_IDs []string) {
|
||||||
|
|
||||||
if strings.Contains(kernel_args, "vfio_pci.disable_vga=1") {
|
if strings.Contains(kernel_args, "vfio_pci.disable_vga=1") {
|
||||||
// Write to logger
|
// Write to logger
|
||||||
logger.Printf("User has disabled vfio video output on host, adding disable_vga=1 to the optional hardcoded vfio_pci options")
|
logger.Printf("User has disabled vfio video output on host, adding disable_vga=1 to the optional hardcoded vfio_pci options\n")
|
||||||
vfio_pci_options = append(vfio_pci_options, "disable_vga=1")
|
vfio_pci_options = append(vfio_pci_options, "disable_vga=1")
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue