Skip to content

Commit

Permalink
set SYSTEMCTL_SKIP_SYSV for "systemctl disable --now" to suppress a…
Browse files Browse the repository at this point in the history
…ttempts to interract with sysv scripts
  • Loading branch information
ilya-zuyev committed Jun 29, 2021
1 parent 0904321 commit 6cb587a
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion pkg/minikube/sysinit/systemd.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}

Expand Down

0 comments on commit 6cb587a

Please sign in to comment.