Commit 23ae1791 authored by ajs124_desk's avatar ajs124_desk Committed by Jouke Witteveen
Browse files

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.
parent 965c476f
......@@ -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:
......
......@@ -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})
......
......@@ -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.
......
# Contributed by: Byron Williams <byron@112percent.com>
# Contributed by: andy123 <ajs@online.de>
. "$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
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment