From: Felix Fietkau <nbd@openwrt.org>
Date: Mon, 27 Feb 2012 23:37:46 +0000 (+0000)
Subject: netifd: add missing do_sysctl function
X-Git-Url: http://git.cdn.openwrt.org/?a=commitdiff_plain;h=14675df5c47c4f34b5e76e2edf698fb8f06ee72c;p=openwrt%2Fsvn-archive%2Farchive.git

netifd: add missing do_sysctl function

SVN-Revision: 30749
---

diff --git a/package/netifd/files/lib/network/config.sh b/package/netifd/files/lib/network/config.sh
index ab3efe8c00..129cb66622 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"
+}