aboutsummaryrefslogtreecommitdiffstats
path: root/package/base-files/files/lib
diff options
context:
space:
mode:
authorSteven Barth <cyrus@openwrt.org>2015-09-08 17:44:13 +0000
committerSteven Barth <cyrus@openwrt.org>2015-09-08 17:44:13 +0000
commit00045fe9d0f379bc2621102dde7e7b630f870ffd (patch)
treeb81885e2b85dd2391c596873d82d8e61528d5721 /package/base-files/files/lib
parent899a23227e5587078e71b599ca447ccfb9b8af79 (diff)
downloadupstream-00045fe9d0f379bc2621102dde7e7b630f870ffd.tar.gz
upstream-00045fe9d0f379bc2621102dde7e7b630f870ffd.tar.bz2
upstream-00045fe9d0f379bc2621102dde7e7b630f870ffd.zip
base-files: add /etc/iproute2/rt_tables, replace ifconfig-usage
Signed-off-by: Steven Barth <steven@midlink.org> SVN-Revision: 46830
Diffstat (limited to 'package/base-files/files/lib')
-rw-r--r--package/base-files/files/lib/preinit/10_indicate_preinit6
1 files changed, 4 insertions, 2 deletions
diff --git a/package/base-files/files/lib/preinit/10_indicate_preinit b/package/base-files/files/lib/preinit/10_indicate_preinit
index 8e94df9ab2..1fab8a20ad 100644
--- a/package/base-files/files/lib/preinit/10_indicate_preinit
+++ b/package/base-files/files/lib/preinit/10_indicate_preinit
@@ -10,13 +10,15 @@ preinit_ip() {
fi
[ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
- ifconfig $pi_ifname $pi_ip netmask $pi_netmask broadcast $pi_broadcast up
+ ip link set dev $pi_ifname up
+ ip -4 address add $pi_ip/$pi_netmask broadcast $pi_broadcast dev $pi_ifname
}
}
preinit_ip_deconfig() {
[ -n "$pi_ifname" ] && grep -q "$pi_ifname" /proc/net/dev && {
- ifconfig $pi_ifname 0.0.0.0 down
+ ip -4 address flush dev $pi_ifname
+ ip link set dev $pi_ifname down
}
}