diff options
author | Felix Fietkau <nbd@openwrt.org> | 2012-02-27 23:37:46 +0000 |
---|---|---|
committer | Felix Fietkau <nbd@openwrt.org> | 2012-02-27 23:37:46 +0000 |
commit | 4814eb5df9451f7186ace1c1803ebe1133998297 (patch) | |
tree | a248a2bff7214007d295f8a9d52cd16a09a1ecf9 /package | |
parent | fe090bcf530b10b6c4f33b31747ad684c1cbc5af (diff) | |
download | mtk-20170518-4814eb5df9451f7186ace1c1803ebe1133998297.zip mtk-20170518-4814eb5df9451f7186ace1c1803ebe1133998297.tar.gz mtk-20170518-4814eb5df9451f7186ace1c1803ebe1133998297.tar.bz2 |
netifd: add missing do_sysctl function
SVN-Revision: 30749
Diffstat (limited to 'package')
-rwxr-xr-x | package/netifd/files/lib/network/config.sh | 5 |
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" +} |