diff --git a/package/ctcgfw/luci-app-airwhu/root/etc/init.d/mentohust b/package/ctcgfw/luci-app-airwhu/root/etc/init.d/mentohust index faf650225b..5bfd80ebf2 100755 --- a/package/ctcgfw/luci-app-airwhu/root/etc/init.d/mentohust +++ b/package/ctcgfw/luci-app-airwhu/root/etc/init.d/mentohust @@ -7,7 +7,7 @@ STOP=10 start() { - if [$(uci get airwhu.@switch[0].enableauth)];then + if [ $(uci get airwhu.@switch[0].enableauth) ];then local Username=$(uci get airwhu.@auth[0].Username) local Password=$(uci get airwhu.@auth[0].Password) local ifname=$(uci get airwhu.@auth[0].ifname) diff --git a/package/ctcgfw/luci-app-mentohust/Makefile b/package/ctcgfw/luci-app-mentohust/Makefile index c7d5eb7a06..3ba3b97b79 100644 --- a/package/ctcgfw/luci-app-mentohust/Makefile +++ b/package/ctcgfw/luci-app-mentohust/Makefile @@ -25,11 +25,6 @@ define Package/luci-app-mentohust/conffiles /etc/config/mentohust endef -define Build/Prepare - $(foreach po,$(wildcard ${CURDIR}/files/luci/i18n/*.po), \ - po2lmo $(po) $(PKG_BUILD_DIR)/$(patsubst %.po,%.lmo,$(notdir $(po)));) -endef - define Build/Configure endef @@ -37,17 +32,16 @@ define Build/Compile endef define Package/luci-app-mentohust/install - $(INSTALL_DIR) $(1)/etc/config - $(INSTALL_DIR) $(1)/etc/init.d - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi/mentohust $(INSTALL_DIR) $(1)/usr/lib/lua/luci/controller - $(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n - $(INSTALL_DATA) $(PKG_BUILD_DIR)/mentohust.*.lmo $(1)/usr/lib/lua/luci/i18n/ - $(INSTALL_CONF) ./files/root/etc/config/mentohust $(1)/etc/config/mentohust + $(INSTALL_DATA) ./luasrc/controller/*.lua $(1)/usr/lib/lua/luci/controller/ + $(INSTALL_DIR) $(1)/usr/lib/lua/luci/model/cbi + $(INSTALL_DATA) ./luasrc/model/cbi/mentohust/*.lua $(1)/usr/lib/lua/luci/model/cbi/mentohust/ + $(INSTALL_DIR) $(1)/etc/config + $(INSTALL_CONF) ./root/etc/config/mentohust $(1)/etc/config/mentohust + $(INSTALL_DIR) $(1)/etc/init.d $(INSTALL_BIN) ./files/root/etc/init.d/mentohust $(1)/etc/init.d/mentohust - $(INSTALL_DATA) ./files/luci/model/cbi/mentohust/general.lua $(1)/usr/lib/lua/luci/model/cbi/mentohust/general.lua - $(INSTALL_DATA) ./files/luci/model/cbi/mentohust/log.lua $(1)/usr/lib/lua/luci/model/cbi/mentohust/log.lua - $(INSTALL_DATA) ./files/luci/controller/mentohust.lua $(1)/usr/lib/lua/luci/controller/mentohust.lua + $(INSTALL_DIR) $(1)/usr/lib/lua/luci/i18n + po2lmo ./po/zh-cn/mentohust.po $(1)/usr/lib/lua/luci/i18n/mentohust.zh-cn.lmo endef $(eval $(call BuildPackage,luci-app-mentohust)) diff --git a/package/ctcgfw/luci-app-mentohust/files/luci/controller/mentohust.lua b/package/ctcgfw/luci-app-mentohust/luasrc/controller/mentohust.lua similarity index 100% rename from package/ctcgfw/luci-app-mentohust/files/luci/controller/mentohust.lua rename to package/ctcgfw/luci-app-mentohust/luasrc/controller/mentohust.lua diff --git a/package/ctcgfw/luci-app-mentohust/files/luci/model/cbi/mentohust/general.lua b/package/ctcgfw/luci-app-mentohust/luasrc/model/cbi/mentohust/general.lua similarity index 99% rename from package/ctcgfw/luci-app-mentohust/files/luci/model/cbi/mentohust/general.lua rename to package/ctcgfw/luci-app-mentohust/luasrc/model/cbi/mentohust/general.lua index 0bf6153127..dc4e9803f0 100644 --- a/package/ctcgfw/luci-app-mentohust/files/luci/model/cbi/mentohust/general.lua +++ b/package/ctcgfw/luci-app-mentohust/luasrc/model/cbi/mentohust/general.lua @@ -7,7 +7,7 @@ local function is_running(name) end local function is_online(ipaddr) - if ipaddr == "0.0.0.0" then + if ipaddr == "0.0.0.0" then return translate("Pinghost not set") end if luci.sys.call("ping -c1 -w1 %s >/dev/null 2>&1" %{ipaddr}) == 0 then diff --git a/package/ctcgfw/luci-app-mentohust/files/luci/model/cbi/mentohust/log.lua b/package/ctcgfw/luci-app-mentohust/luasrc/model/cbi/mentohust/log.lua similarity index 98% rename from package/ctcgfw/luci-app-mentohust/files/luci/model/cbi/mentohust/log.lua rename to package/ctcgfw/luci-app-mentohust/luasrc/model/cbi/mentohust/log.lua index ec2018b469..d4b899a668 100644 --- a/package/ctcgfw/luci-app-mentohust/files/luci/model/cbi/mentohust/log.lua +++ b/package/ctcgfw/luci-app-mentohust/luasrc/model/cbi/mentohust/log.lua @@ -20,4 +20,4 @@ end f.submit = translate("Clear log") f.reset = false -return f \ No newline at end of file +return f diff --git a/package/ctcgfw/luci-app-mentohust/files/luci/i18n/mentohust.zh-cn.po b/package/ctcgfw/luci-app-mentohust/po/zh-cn/mentohust.po similarity index 100% rename from package/ctcgfw/luci-app-mentohust/files/luci/i18n/mentohust.zh-cn.po rename to package/ctcgfw/luci-app-mentohust/po/zh-cn/mentohust.po diff --git a/package/ctcgfw/luci-app-mentohust/files/root/etc/config/mentohust b/package/ctcgfw/luci-app-mentohust/root/etc/config/mentohust similarity index 100% rename from package/ctcgfw/luci-app-mentohust/files/root/etc/config/mentohust rename to package/ctcgfw/luci-app-mentohust/root/etc/config/mentohust diff --git a/package/ctcgfw/luci-app-mentohust/files/root/etc/init.d/mentohust b/package/ctcgfw/luci-app-mentohust/root/etc/init.d/mentohust similarity index 100% rename from package/ctcgfw/luci-app-mentohust/files/root/etc/init.d/mentohust rename to package/ctcgfw/luci-app-mentohust/root/etc/init.d/mentohust