networkd: Fix bug causing bonding to always be loaded
This commit is contained in:
parent
a923161f4a
commit
c39dd5cc67
@ -74,16 +74,15 @@ func maybeProbe8012q(interfaces []network.InterfaceGenerator) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func maybeProbeBonding(interfaces []network.InterfaceGenerator) error {
|
func maybeProbeBonding(interfaces []network.InterfaceGenerator) error {
|
||||||
args := []string{"bonding"}
|
|
||||||
for _, iface := range interfaces {
|
for _, iface := range interfaces {
|
||||||
if iface.Type() == "bond" {
|
if iface.Type() == "bond" {
|
||||||
args = append(args, strings.Split(iface.ModprobeParams(), " ")...)
|
args := append([]string{"bonding"}, strings.Split(iface.ModprobeParams(), " ")...)
|
||||||
break
|
|
||||||
}
|
|
||||||
}
|
|
||||||
log.Printf("Probing LKM %q (%q)\n", "bonding", args)
|
log.Printf("Probing LKM %q (%q)\n", "bonding", args)
|
||||||
return exec.Command("modprobe", args...).Run()
|
return exec.Command("modprobe", args...).Run()
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
func restartNetworkd() error {
|
func restartNetworkd() error {
|
||||||
log.Printf("Restarting networkd.service\n")
|
log.Printf("Restarting networkd.service\n")
|
||||||
|
Loading…
Reference in New Issue
Block a user