From: Jo-Philipp Wich Date: Sun, 15 Dec 2013 15:32:37 +0000 (+0000) Subject: uhttpd: don't process ubus_* and lua_* options if corresponding plugin is not install... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=e444eb0bbd90c67b787c0e9b7875d241a4de939a;p=openwrt%2Fstaging%2Fmkresin.git uhttpd: don't process ubus_* and lua_* options if corresponding plugin is not installed (#14618) SVN-Revision: 39057 --- diff --git a/package/network/services/uhttpd/files/uhttpd.init b/package/network/services/uhttpd/files/uhttpd.init index 5b7686470b..9a76d8c1ff 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"