mirror of
https://github.com/rwinkhart/cachyos-postinstall-helper.git
synced 2026-08-28 04:46:52 -04:00
29 lines
696 B
Go
29 lines
696 B
Go
package main
|
|
|
|
import (
|
|
"os"
|
|
"os/exec"
|
|
|
|
"github.com/rwinkhart/go-boilerplate/other"
|
|
)
|
|
|
|
func universalTweaks() {
|
|
// Lock root account
|
|
cmd := exec.Command("usermod", "--delete", "root")
|
|
cmd.Run()
|
|
cmd = exec.Command("usermod", "--lock", "root")
|
|
cmd.Run()
|
|
|
|
// Add user to uucp group for non-root serial console usage
|
|
cmd = exec.Command("usermod", "-aG", "uucp", getUsername())
|
|
cmd.Run()
|
|
|
|
// Force disable kernel watchdog (kernel parameters should do this as well)
|
|
f, err := os.Create("/etc/modprobe.d/blacklist.conf")
|
|
if err != nil {
|
|
other.PrintError("Failed to create /etc/modprobe.d/blacklist.conf", 1)
|
|
}
|
|
f.WriteString("# Disable kernel watchdog\nblacklist iTCO_wdt")
|
|
f.Close()
|
|
}
|