aboutsummaryrefslogtreecommitdiffstats
path: root/package/netifd
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
commit9c7f658df36a4ef618b7fa5040f18a272d26bcff (patch)
tree4770b5df227e263a09eef195b28f0873b5014724 /package/netifd
parentf9a7a43e5562b8632eaeec38bea74e0352bbd4ad (diff)
downloadmaster-187ad058-9c7f658df36a4ef618b7fa5040f18a272d26bcff.tar.gz
master-187ad058-9c7f658df36a4ef618b7fa5040f18a272d26bcff.tar.bz2
master-187ad058-9c7f658df36a4ef618b7fa5040f18a272d26bcff.zip
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')
-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 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"
+}