aboutsummaryrefslogtreecommitdiffstats
path: root/package/netifd/files
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 /package/netifd/files
parentfe090bcf530b10b6c4f33b31747ad684c1cbc5af (diff)
downloadupstream-4814eb5df9451f7186ace1c1803ebe1133998297.tar.gz
upstream-4814eb5df9451f7186ace1c1803ebe1133998297.tar.bz2
upstream-4814eb5df9451f7186ace1c1803ebe1133998297.zip
netifd: add missing do_sysctl function
SVN-Revision: 30749
Diffstat (limited to 'package/netifd/files')
-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"
+}