From c39dd5cc6745cab87516bed14e8c52e53b17142c Mon Sep 17 00:00:00 2001 From: Alex Crawford Date: Sat, 16 Aug 2014 10:44:29 -0700 Subject: [PATCH] networkd: Fix bug causing bonding to always be loaded --- system/networkd.go | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/system/networkd.go b/system/networkd.go index 0b0ffa7..0749c9c 100644 --- a/system/networkd.go +++ b/system/networkd.go @@ -74,15 +74,14 @@ func maybeProbe8012q(interfaces []network.InterfaceGenerator) error { } func maybeProbeBonding(interfaces []network.InterfaceGenerator) error { - args := []string{"bonding"} for _, iface := range interfaces { if iface.Type() == "bond" { - args = append(args, strings.Split(iface.ModprobeParams(), " ")...) - break + args := append([]string{"bonding"}, strings.Split(iface.ModprobeParams(), " ")...) + log.Printf("Probing LKM %q (%q)\n", "bonding", args) + return exec.Command("modprobe", args...).Run() } } - log.Printf("Probing LKM %q (%q)\n", "bonding", args) - return exec.Command("modprobe", args...).Run() + return nil } func restartNetworkd() error {