projects
/
openwrt
/
svn-archive
/
archive.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
| inline |
side by side
netifd: add missing do_sysctl function
[openwrt/svn-archive/archive.git]
/
package
/
netifd
/
files
/
lib
/
network
/
config.sh
diff --git
a/package/netifd/files/lib/network/config.sh
b/package/netifd/files/lib/network/config.sh
index ab3efe8c005c99e5c522cedc7d0141a7f72369a1..129cb66622f37447e6d30d2b707351b884bab4b8 100755
(executable)
--- 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"
+}