Skip to content

Commit ea31492

Browse files
Yisui Hudlorenc
Yisui Hu
authored andcommitted
use consistent path for localkube.service
/usr/lib/systemd/system is not consistent across different distribution /etc/systemd/system should be used. See issue: #2098
1 parent d9089c3 commit ea31492

File tree

2 files changed

+1
-5
lines changed

2 files changed

+1
-5
lines changed

pkg/drivers/none/none.go

-4
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ package none
1919
import (
2020
"bytes"
2121
"fmt"
22-
"os"
2322
"os/exec"
2423
"strings"
2524

@@ -150,9 +149,6 @@ func (d *Driver) Restart() error {
150149
}
151150

152151
func (d *Driver) Start() error {
153-
if err := os.MkdirAll("/usr/lib/systemd/system/", os.FileMode(0755)); err != nil {
154-
return err
155-
}
156152
d.IPAddress = "127.0.0.1"
157153
d.URL = "127.0.0.1:8080"
158154
return nil

pkg/minikube/constants/constants.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ const (
137137
)
138138

139139
const (
140-
LocalkubeServicePath = "/usr/lib/systemd/system/localkube.service"
140+
LocalkubeServicePath = "/etc/systemd/system/localkube.service"
141141
LocalkubeRunning = "active"
142142
LocalkubeStopped = "inactive"
143143
)

0 commit comments

Comments
 (0)