File tree Expand file tree Collapse file tree 1 file changed +3
-2
lines changed
cmd/kubeadm/app/util/initsystem Expand file tree Collapse file tree 1 file changed +3
-2
lines changed Original file line number Diff line number Diff line change @@ -65,8 +65,9 @@ func (openrc OpenRCInitSystem) ServiceIsEnabled(service string) bool {
65
65
// ServiceIsActive ensures the service is running, or attempting to run. (crash looping in the case of kubelet)
66
66
func (openrc OpenRCInitSystem ) ServiceIsActive (service string ) bool {
67
67
args := []string {service , "status" }
68
- outBytes , _ := exec .Command ("rc-service" , args ... ).Output ()
69
- return ! strings .Contains (string (outBytes ), "stopped" )
68
+ outBytes , _ := exec .Command ("rc-service" , args ... ).CombinedOutput ()
69
+ outStr := string (outBytes )
70
+ return ! strings .Contains (outStr , "stopped" ) && ! strings .Contains (outStr , "does not exist" )
70
71
}
71
72
72
73
// EnableCommand return a string describing how to enable a service
You can’t perform that action at this time.
0 commit comments