hostman: ensure openvswitch won't automatically start at boot

This commit is contained in:
Yousong Zhou
2019-10-11 15:32:31 +00:00
parent 8307490468
commit dee6fa9d2d

View File

@@ -326,6 +326,12 @@ func OVSPrepare() error {
if !ovs.IsInstalled() {
return fmt.Errorf("Service openvswitch not installed!")
}
if ovs.IsEnabled() {
err := ovs.Disable()
if err != nil {
log.Errorf("Disabling openvswitch service failed: %v", err)
}
}
if !ovs.IsActive() {
return ovs.Start(false)
}