From 23ae1791917d48da7237d918f19dfa55a6a13d8f Mon Sep 17 00:00:00 2001 From: ajs124_desk Date: Sat, 1 Mar 2014 21:42:52 +0100 Subject: port bonding from ifenslave to iproute2 Ifenslave is deprecated according to the kernel documentation: https://www.kernel.org/doc/Documentation/networking/bonding.txt It also added an additional, unnecessary dependency. I tried to update the documentation to reflect this change. --- README | 1 - contrib/PKGBUILD.in | 1 - docs/netctl.profile.5.txt | 3 +-- src/lib/connections/bond | 8 +++----- 4 files changed, 4 insertions(+), 9 deletions(-) diff --git a/README b/README index 9b27fa6..517b8da 100644 --- a/README +++ b/README @@ -11,7 +11,6 @@ Optional: - dialog: for the interactive assistant - ifplugd: for automatic connection - wpa_actiond: for automatic connection -- ifenslave: for bonding support - bridge-utils: for bridge support For documentation generation: diff --git a/contrib/PKGBUILD.in b/contrib/PKGBUILD.in index 5375b36..22cddd8 100644 --- a/contrib/PKGBUILD.in +++ b/contrib/PKGBUILD.in @@ -16,7 +16,6 @@ optdepends=('dialog: for the menu based wifi assistant' 'wpa_supplicant: for wireless networking support' 'ifplugd: for automatic wired connections through netctl-ifplugd' 'wpa_actiond: for automatic wireless connections through netctl-auto' - 'ifenslave: for bond connections' 'ppp: for pppoe connections' ) source=(ftp://ftp.archlinux.org/other/packages/netctl/netctl-${pkgver}.tar.xz{,.sig}) diff --git a/docs/netctl.profile.5.txt b/docs/netctl.profile.5.txt index 649520b..623a24d 100644 --- a/docs/netctl.profile.5.txt +++ b/docs/netctl.profile.5.txt @@ -37,8 +37,7 @@ AVAILABLE CONNECTION TYPES For wireless connections. This connection type requires *wpa_supplicant* to be available. +bond+:: - Network bonding. This connection type requires *ifenslave* to be - available. + For bonded interfaces. +bridge+:: Network bridging. This connection type requires *brctl* to be available. diff --git a/src/lib/connections/bond b/src/lib/connections/bond index 9cc8b96..2909b90 100644 --- a/src/lib/connections/bond +++ b/src/lib/connections/bond @@ -1,8 +1,7 @@ -# Contributed by: Byron Williams +# Contributed by: andy123 . "$SUBR_DIR/ip" -: ${IFENSLAVE:=ifenslave} declare -ag BindsToInterfaces bond_up() { @@ -15,8 +14,7 @@ bond_up() { bring_interface_up "$Interface" for slave in "${BindsToInterfaces[@]}"; do - bring_interface_up "$slave" - $IFENSLAVE "$Interface" "$slave" + ip link set dev "$slave" master "$Interface" done ip_set @@ -24,7 +22,7 @@ bond_up() { bond_down() { for slave in "${BindsToInterfaces[@]}"; do - $IFENSLAVE "$Interface" -d "$slave" + ip link set dev "$slave" nomaster done ip_unset -- cgit v1.2.3-24-g4f1b