diff options
author | Jo-Philipp Wich <jow@openwrt.org> | 2013-12-15 15:32:37 +0000 |
---|---|---|
committer | Jo-Philipp Wich <jow@openwrt.org> | 2013-12-15 15:32:37 +0000 |
commit | e444eb0bbd90c67b787c0e9b7875d241a4de939a (patch) | |
tree | aae138a59c3d4741c1d1e7b1b305246cf9f424c1 /package/network | |
parent | 94f3a19a2121ec9f2b131e758d28a11c7b12d1cb (diff) | |
download | mtk-20170518-e444eb0bbd90c67b787c0e9b7875d241a4de939a.zip mtk-20170518-e444eb0bbd90c67b787c0e9b7875d241a4de939a.tar.gz mtk-20170518-e444eb0bbd90c67b787c0e9b7875d241a4de939a.tar.bz2 |
uhttpd: don't process ubus_* and lua_* options if corresponding plugin is not installed (#14618)
SVN-Revision: 39057
Diffstat (limited to 'package/network')
-rwxr-xr-x | package/network/services/uhttpd/files/uhttpd.init | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init index 5b76864..9a76d8c 100755 --- a/package/network/services/uhttpd/files/uhttpd.init +++ b/package/network/services/uhttpd/files/uhttpd.init @@ -67,10 +67,14 @@ start_instance() append_arg "$cfg" realm "-r" "${realm:-OpenWrt}" append_arg "$cfg" config "-c" append_arg "$cfg" cgi_prefix "-x" - append_arg "$cfg" lua_prefix "-l" - append_arg "$cfg" lua_handler "-L" - append_arg "$cfg" ubus_prefix "-u" - append_arg "$cfg" ubus_socket "-U" + [ -f /usr/lib/uhttpd_lua.so ] && { + append_arg "$cfg" lua_prefix "-l" + append_arg "$cfg" lua_handler "-L" + } + [ -f /usr/lib/uhttpd_ubus.so ] && { + append_arg "$cfg" ubus_prefix "-u" + append_arg "$cfg" ubus_socket "-U" + } append_arg "$cfg" script_timeout "-t" append_arg "$cfg" network_timeout "-T" append_arg "$cfg" http_keepalive "-k" |