diff options
author | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-12-15 15:32:37 +0000 |
---|---|---|
committer | jow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73> | 2013-12-15 15:32:37 +0000 |
commit | f726a1718c40b91c11997336f7e328369301e370 (patch) | |
tree | 990e03276ba533af518dc2bb0fb401e558fa4231 /package | |
parent | 3bfd133746d3342fa52cda2da605664e1aee0a69 (diff) |
uhttpd: don't process ubus_* and lua_* options if corresponding plugin is not installed (#14618)
git-svn-id: svn://svn.openwrt.org/openwrt/trunk@39057 3c298f89-4303-0410-b956-a3cf2f4a3e73
Diffstat (limited to 'package')
-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 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" |