netifd: add missing do_sysctl function

SVN-Revision: 30749
lede-17.01
Felix Fietkau 2012-02-27 23:37:46 +00:00
parent fe090bcf53
commit 4814eb5df9
1 changed files with 5 additions and 0 deletions

View File

@ -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"
}