summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFelix Fietkau <nbd@openwrt.org>2012-02-27 23:37:46 +0000
committerFelix Fietkau <nbd@openwrt.org>2012-02-27 23:37:46 +0000
commit4814eb5df9451f7186ace1c1803ebe1133998297 (patch)
treea248a2bff7214007d295f8a9d52cd16a09a1ecf9
parentfe090bcf530b10b6c4f33b31747ad684c1cbc5af (diff)
downloadmtk-20170518-4814eb5df9451f7186ace1c1803ebe1133998297.zip
mtk-20170518-4814eb5df9451f7186ace1c1803ebe1133998297.tar.gz
mtk-20170518-4814eb5df9451f7186ace1c1803ebe1133998297.tar.bz2
netifd: add missing do_sysctl function
SVN-Revision: 30749
-rwxr-xr-xpackage/netifd/files/lib/network/config.sh5
1 files changed, 5 insertions, 0 deletions
diff --git a/package/netifd/files/lib/network/config.sh b/package/netifd/files/lib/network/config.sh
index ab3efe8..129cb66 100755
--- a/package/netifd/files/lib/network/config.sh
+++ b/package/netifd/files/lib/network/config.sh
@@ -57,3 +57,8 @@ setup_interface() {
ubus call network.interface."$config" add_device "{ \"name\": \"$iface\" }"
}
+do_sysctl() {
+ [ -n "$2" ] && \
+ sysctl -n -e -w "$1=$2" >/dev/null || \
+ sysctl -n -e "$1"
+}