diff options
author | Steven Barth <cyrus@openwrt.org> | 2015-09-08 17:44:24 +0000 |
---|---|---|
committer | Steven Barth <cyrus@openwrt.org> | 2015-09-08 17:44:24 +0000 |
commit | e07959cade0eba1c85a76d76a1a673363c9f55fb (patch) | |
tree | a67502d0f73e9016128f70254b142e3326663423 /package/kernel | |
parent | 579fe7f52ab6c6d6ec6087901f8e5514cea4b4e8 (diff) | |
download | upstream-e07959cade0eba1c85a76d76a1a673363c9f55fb.tar.gz upstream-e07959cade0eba1c85a76d76a1a673363c9f55fb.tar.bz2 upstream-e07959cade0eba1c85a76d76a1a673363c9f55fb.zip |
package: replace ifconfig-usage with ip
Signed-off-by: Steven Barth <steven@midlink.org>
SVN-Revision: 46832
Diffstat (limited to 'package/kernel')
4 files changed, 11 insertions, 11 deletions
diff --git a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh index 859fca1bb1..a9c4de22e9 100644 --- a/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh +++ b/package/kernel/broadcom-wl/files/lib/wifi/broadcom.sh @@ -101,7 +101,7 @@ disable_broadcom() { for dev in /sys/class/net/wds${device##wl}-* /sys/class/net/${device}-* /sys/class/net/${device}; do if [ -e "$dev" ]; then ifname=${dev##/sys/class/net/} - ifconfig "$ifname" down + ip link set dev "$ifname" down unbridge "$ifname" fi done @@ -372,8 +372,8 @@ enable_broadcom() { local if_cmd="if_pre_up" [ "$ifname" != "${ifname##${device}-}" ] && if_cmd="if_up" append $if_cmd "macaddr=\$(wlc ifname '$ifname' cur_etheraddr)" ";$N" - append $if_cmd "ifconfig '$ifname' \${macaddr:+hw ether \$macaddr}" ";$N" - append if_up "ifconfig '$ifname' up" ";$N" + append $if_cmd "ip link set dev '$ifname' address \$macaddr" ";$N" + append if_up "ip link set dev '$ifname' up" ";$N" local net_cfg="$(find_net_config "$vif")" [ -z "$net_cfg" ] || { diff --git a/package/kernel/hostap-driver/files/lib/wifi/hostap.sh b/package/kernel/hostap-driver/files/lib/wifi/hostap.sh index 62d2e7e472..e35b76c0fd 100755 --- a/package/kernel/hostap-driver/files/lib/wifi/hostap.sh +++ b/package/kernel/hostap-driver/files/lib/wifi/hostap.sh @@ -78,7 +78,7 @@ disable_prism2() ( set $line [ -f "/var/run/wifi-${1}.pid" ] && kill "$(cat "/var/run/wifi-${1}.pid")" - ifconfig "$1" down + ip link set dev "$1" down unbridge "$1" iwpriv "$phy" wds_del "$2" done @@ -204,7 +204,7 @@ enable_prism2() { hostapd_setup_vif "$vif" hostap || { echo "enable_prism2($device): Failed to set up hostapd for interface $ifname" >&2 # make sure this wifi interface won't accidentally stay open without encryption - ifconfig "$ifname" down + ip link set dev "$ifname" down continue } fi @@ -213,7 +213,7 @@ enable_prism2() { if eval "type wpa_supplicant_setup_vif" 2>/dev/null >/dev/null; then wpa_supplicant_setup_vif "$vif" wext || { echo "enable_prism2($device): Failed to set up wpa_supplicant for interface $ifname" >&2 - ifconfig "$ifname" down + ip link set dev "$ifname" down continue } fi diff --git a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh index c9bc3d610d..2a8d2f9430 100644 --- a/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh +++ b/package/kernel/mac80211/files/lib/netifd/wireless/mac80211.sh @@ -486,7 +486,7 @@ mac80211_prepare_vif() { # All interfaces must have unique mac addresses # which can either be explicitly set in the device # section, or automatically generated - ifconfig "$ifname" hw ether "$macaddr" + ip link set dev "$ifname" address "$macaddr" fi json_select .. @@ -582,7 +582,7 @@ mac80211_setup_vif() { json_get_vars mode json_get_var vif_txpower txpower - ifconfig "$ifname" up || { + ip link set dev "$ifname" up || { wireless_setup_vif_failed IFUP_ERROR json_select .. return @@ -638,7 +638,7 @@ mac80211_interface_cleanup() { local phy="$1" for wdev in $(list_phy_interfaces "$phy"); do - ifconfig "$wdev" down 2>/dev/null + ip link set dev "$wdev" down 2>/dev/null iw dev "$wdev" del done } diff --git a/package/kernel/trelay/files/trelay.init b/package/kernel/trelay/files/trelay.init index c812e12c69..e705275e3a 100644 --- a/package/kernel/trelay/files/trelay.init +++ b/package/kernel/trelay/files/trelay.init @@ -13,8 +13,8 @@ check_relay() { [ -d "/sys/kernel/debug/trelay/${dev1}-${dev2}" ] && return [ -d "/sys/class/net/${dev1}" -a -d "/sys/class/net/${dev2}" ] || return - ifconfig "$dev1" up - ifconfig "$dev2" up + ip link set dev "$dev1" up + ip link set dev "$dev2" up echo "${dev1}-${dev2},${dev1},${dev2}" > /sys/kernel/debug/trelay/add } |