Fourth round of fixes

This commit is contained in:
2025-09-30 00:33:20 -04:00
parent 1d6d89be05
commit 2905fbc275
6 changed files with 26 additions and 44 deletions
+1 -12
View File
@@ -1,11 +1,5 @@
package main
import (
"os"
"github.com/rwinkhart/go-boilerplate/other"
)
func universalTweaks() {
// Lock root account
chrootCommandRun([]string{"passwd", "--delete", "root"})
@@ -15,10 +9,5 @@ func universalTweaks() {
chrootCommandRun([]string{"usermod", "-aG", "uucp", getUsername()})
// Force disable kernel watchdog (kernel parameters should do this as well)
f, err := os.Create(mountPoint + "/etc/modprobe.d/blacklist.conf")
if err != nil {
other.PrintError("Failed to create "+mountPoint+"/etc/modprobe.d/blacklist.conf", 1)
}
f.WriteString("# Disable kernel watchdog\nblacklist iTCO_wdt")
f.Close()
writeFile(mountPoint+"/etc/modprobe.d/blacklist.conf", "# Disable kernel watchdog\nblacklist iTCO_wdt\n", "root", 0644)
}