summaryrefslogtreecommitdiffstats
path: root/package/netifd/files/lib
diff options
context:
space:
mode:
authornbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-02-27 23:37:46 +0000
committernbd <nbd@3c298f89-4303-0410-b956-a3cf2f4a3e73>2012-02-27 23:37:46 +0000
commit664467e66fa2c97a334ff7d4cd4392370a6d3abe (patch)
tree4770b5df227e263a09eef195b28f0873b5014724 /package/netifd/files/lib
parenta6b7f7328790d165a9efddaab3edad8d6476928f (diff)
netifd: add missing do_sysctl function
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@30749 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package/netifd/files/lib')
-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 ab3efe8c0..129cb6662 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"
+}