Skip to content

Commit

Permalink
chore: logging output cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
HikariKnight committed Mar 20, 2024
1 parent 74fa194 commit f5c71ee
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
2 changes: 1 addition & 1 deletion internal/configs/config_bootloaders.go
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ func Set_Grub2() ([]string, error) {
sysfile := sysfile_re.ReplaceAllString(conffile, "")

// Write to logger
logger.Printf("Executing command:\nsudo cp -v \"%s\" %s", conffile, sysfile)
logger.Printf("Executing command:\nsudo cp -v \"%s\" %s\n", conffile, sysfile)

// Make our output slice
var output []string
Expand Down
2 changes: 1 addition & 1 deletion internal/configs/configs.go
Original file line number Diff line number Diff line change
Expand Up @@ -244,7 +244,7 @@ func CopyToSystem(conffile, sysfile string) string {
clean_output := clean_re.ReplaceAllString(output[0], "")

// Write output to logger
logger.Printf(clean_output)
logger.Printf("%s\n", clean_output)

// Return the output
return fmt.Sprintf("Copying: %s", clean_output)
Expand Down
12 changes: 6 additions & 6 deletions internal/pages/06_finalize.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ func prepModules(config *configs.Config) {
// Configure grub2 here as we can make the config without sudo
if config.Bootloader == "grub2" {
// Write to logger
logger.Printf("Configuring grub2 manually")
logger.Printf("Configuring grub2 manually\n")
configs.Configure_Grub2()
}

Expand Down Expand Up @@ -117,23 +117,23 @@ func installPassthrough(config *configs.Config) {
// Based on the bootloader, setup the configuration
if config.Bootloader == "kernelstub" {
// Write to logger
logger.Printf("Configuring systemd-boot using kernelstub")
logger.Printf("Configuring systemd-boot using kernelstub\n")

// Configure kernelstub
output = configs.Set_KernelStub()
fmt.Printf("%s\n", output)

} else if config.Bootloader == "grubby" {
// Write to logger
logger.Printf("Configuring bootloader using grubby")
logger.Printf("Configuring bootloader using grubby\n")

// Configure kernelstub
output = configs.Set_Grubby()
fmt.Printf("%s\n", output)

} else if config.Bootloader == "grub2" {
// Write to logger
logger.Printf("Applying grub2 changes")
logger.Printf("Applying grub2 changes\n")
grub_output, _ := configs.Set_Grub2()
fmt.Printf("%s\n", strings.Join(grub_output, "\n"))

Expand Down Expand Up @@ -164,7 +164,7 @@ func installPassthrough(config *configs.Config) {
fmt.Printf("%s\n", output)

// Write to logger
logger.Printf("Executing: sudo update-initramfs -u")
logger.Printf("Executing: sudo update-initramfs -u\n")

// Update initramfs
fmt.Println("Executed: sudo update-initramfs -u\nSee debug.log for detailed output")
Expand All @@ -183,7 +183,7 @@ func installPassthrough(config *configs.Config) {
sysinfo := uname.New()

// Write to logger
logger.Printf("Executing: sudo dracut -f -v --kver %s", sysinfo.Release)
logger.Printf("Executing: sudo dracut -f -v --kver %s\n", sysinfo.Release)

// Update initramfs
fmt.Printf("Executed: sudo dracut -f -v --kver %s\nSee debug.log for detailed output", sysinfo.Release)
Expand Down

0 comments on commit f5c71ee

Please sign in to comment.