From 6cb587a8736fe4fb414867df984d0db50cbbc9a6 Mon Sep 17 00:00:00 2001 From: Ilya Zuyev Date: Tue, 29 Jun 2021 14:03:39 -0700 Subject: [PATCH] set `SYSTEMCTL_SKIP_SYSV` for "systemctl disable --now" to suppress attempts to interract with sysv scripts --- pkg/minikube/sysinit/systemd.go | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/pkg/minikube/sysinit/systemd.go b/pkg/minikube/sysinit/systemd.go index c452bba729d3..54d4084d773d 100644 --- a/pkg/minikube/sysinit/systemd.go +++ b/pkg/minikube/sysinit/systemd.go @@ -59,7 +59,10 @@ func (s *Systemd) Disable(svc string) error { // DisableNow disables a service and stops it too (not waiting for next restart) func (s *Systemd) DisableNow(svc string) error { - _, err := s.r.RunCmd(exec.Command("sudo", "systemctl", "disable", "--now", svc)) + cmd := exec.Command("sudo", "systemctl", "disable", "--now", svc) + // See https://github.com/kubernetes/minikube/issues/11615#issuecomment-861794258 + cmd.Env = append(cmd.Env, "SYSTEMCTL_SKIP_SYSV=1") + _, err := s.r.RunCmd(cmd) return err }