mirror of
https://github.com/rwinkhart/cachyos-postinstall-helper.git
synced 2026-08-27 20:36:32 -04:00
Initial code commit
This commit is contained in:
@@ -0,0 +1,28 @@
|
||||
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()
|
||||
}
|
||||
Reference in New Issue
Block a user