mirror of
https://hubproxy.babadafafafafa.cn/https://github.com/yunionio/cloudpods.git
synced 2026-09-20 16:13:56 +08:00
hostman: ensure openvswitch won't automatically start at boot
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user