From b1b6c4a4d205d5e0409feafd467eeb1e196c5120 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E5=AD=90=E4=B8=B9?= <1228736998@qq.com> Date: Fri, 3 Jun 2022 21:07:45 +0800 Subject: [PATCH] can disable tftp services with warewulf.conf --- internal/pkg/configure/tftp.go | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/internal/pkg/configure/tftp.go b/internal/pkg/configure/tftp.go index b00f5928..7f87cd03 100644 --- a/internal/pkg/configure/tftp.go +++ b/internal/pkg/configure/tftp.go @@ -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 {