mirror of
https://github.com/openwrt/openwrt.git
synced 2024-12-23 15:32:33 +00:00
uhttpd: Enable integrated Lua by default
We enabled lua interpreter by default as it doesn't make any problem in the uhttpd config file and we modify the index page to use it. Signed-off-by: Ansuel Smith <ansuelsmth@gmail.com>
This commit is contained in:
parent
a131b892ea
commit
324ec18615
@ -8,7 +8,7 @@
|
|||||||
include $(TOPDIR)/rules.mk
|
include $(TOPDIR)/rules.mk
|
||||||
|
|
||||||
PKG_NAME:=uhttpd
|
PKG_NAME:=uhttpd
|
||||||
PKG_RELEASE:=1
|
PKG_RELEASE:=2
|
||||||
|
|
||||||
PKG_SOURCE_PROTO:=git
|
PKG_SOURCE_PROTO:=git
|
||||||
PKG_SOURCE_URL=$(LEDE_GIT)/project/uhttpd.git
|
PKG_SOURCE_URL=$(LEDE_GIT)/project/uhttpd.git
|
||||||
@ -46,9 +46,12 @@ define Package/uhttpd/config
|
|||||||
config PACKAGE_uhttpd_debug
|
config PACKAGE_uhttpd_debug
|
||||||
bool "Build with debug messages"
|
bool "Build with debug messages"
|
||||||
default n
|
default n
|
||||||
|
config uhttpd_lua
|
||||||
|
depends on PACKAGE_uhttpd-mod-lua
|
||||||
|
bool "Enable Integrated Lua interpreter"
|
||||||
|
default y
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
|
||||||
define Package/uhttpd-mod-lua
|
define Package/uhttpd-mod-lua
|
||||||
$(Package/uhttpd/default)
|
$(Package/uhttpd/default)
|
||||||
TITLE+= (Lua plugin)
|
TITLE+= (Lua plugin)
|
||||||
@ -106,6 +109,16 @@ define Package/uhttpd-mod-ubus/install
|
|||||||
$(INSTALL_DATA) ./files/ubus.default $(1)/etc/uci-defaults/00_uhttpd_ubus
|
$(INSTALL_DATA) ./files/ubus.default $(1)/etc/uci-defaults/00_uhttpd_ubus
|
||||||
endef
|
endef
|
||||||
|
|
||||||
|
define Package/uhttpd-mod-lua/postinst
|
||||||
|
$(if $(CONFIG_uhttpd_lua),
|
||||||
|
#!/bin/sh
|
||||||
|
if [ -f $${IPKG_INSTROOT}/www/index.html ]
|
||||||
|
then
|
||||||
|
sed -e 's:/cgi-bin::g' -i $${IPKG_INSTROOT}/www/index.html
|
||||||
|
fi
|
||||||
|
,)
|
||||||
|
endef
|
||||||
|
|
||||||
|
|
||||||
$(eval $(call BuildPackage,uhttpd))
|
$(eval $(call BuildPackage,uhttpd))
|
||||||
$(eval $(call BuildPackage,uhttpd-mod-lua))
|
$(eval $(call BuildPackage,uhttpd-mod-lua))
|
||||||
|
@ -51,8 +51,8 @@ config uhttpd main
|
|||||||
|
|
||||||
# Lua url prefix and handler script.
|
# Lua url prefix and handler script.
|
||||||
# Lua support is disabled if no prefix given.
|
# Lua support is disabled if no prefix given.
|
||||||
# option lua_prefix /luci
|
option lua_prefix /luci
|
||||||
# option lua_handler /usr/lib/lua/luci/sgi/uhttpd.lua
|
option lua_handler /usr/lib/lua/luci/sgi/uhttpd.lua
|
||||||
|
|
||||||
# Specify the ubus-rpc prefix and socket path.
|
# Specify the ubus-rpc prefix and socket path.
|
||||||
# option ubus_prefix /ubus
|
# option ubus_prefix /ubus
|
||||||
|
Loading…
Reference in New Issue
Block a user