can disable tftp services with warewulf.conf

This commit is contained in:
王子丹
2022-06-03 21:07:45 +08:00
parent 8086d03f17
commit b1b6c4a4d2

View File

@@ -35,6 +35,11 @@ func TFTP() error {
}
}
if !controller.Tftp.Enabled {
wwlog.Printf(wwlog.INFO, "Warewulf does not auto start TFTP services due to disable by warewulf.conf\n")
os.Exit(0)
}
fmt.Printf("Enabling and restarting the TFTP services\n")
err = util.SystemdStart(controller.Tftp.SystemdName)
if err != nil {