From 403b939acd55be528fa78bfc11521c78b1afdad8 Mon Sep 17 00:00:00 2001 From: Daniel Dickinson Date: Tue, 1 Dec 2015 21:36:30 -0500 Subject: modules/luci-base: Move LuCI FileUpload directory to /etc/luci-uploads and save across sysupgrade /lib/uci/upload is a rather odd place for configuration files Also the files were not saved across sysupgrade, which is somewhat counter-productive for configuration files. Signed-off By: Daniel Dickinson --- modules/luci-base/Makefile | 4 ++++ modules/luci-base/luasrc/cbi.lua | 2 +- modules/luci-base/root/etc/luci-uploads/.placeholder | 0 modules/luci-base/root/lib/uci/upload/.placeholder | 0 4 files changed, 5 insertions(+), 1 deletion(-) create mode 100644 modules/luci-base/root/etc/luci-uploads/.placeholder delete mode 100644 modules/luci-base/root/lib/uci/upload/.placeholder (limited to 'modules') diff --git a/modules/luci-base/Makefile b/modules/luci-base/Makefile index 26cbe0820..a9c5e71cb 100644 --- a/modules/luci-base/Makefile +++ b/modules/luci-base/Makefile @@ -22,6 +22,10 @@ HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/LuaSrcDiet-0.12.1 include $(INCLUDE_DIR)/host-build.mk +define Package/luci-base/conffiles +/etc/luci-uploads +endef + include ../../luci.mk define Host/Configure diff --git a/modules/luci-base/luasrc/cbi.lua b/modules/luci-base/luasrc/cbi.lua index b5b2c8d8f..8fd0a337e 100644 --- a/modules/luci-base/luasrc/cbi.lua +++ b/modules/luci-base/luasrc/cbi.lua @@ -38,7 +38,7 @@ function load(cbimap, ...) require("luci.config") require("luci.util") - local upldir = "/lib/uci/upload/" + local upldir = "/etc/luci-uploads/" local cbidir = luci.util.libpath() .. "/model/cbi/" local func, err diff --git a/modules/luci-base/root/etc/luci-uploads/.placeholder b/modules/luci-base/root/etc/luci-uploads/.placeholder new file mode 100644 index 000000000..e69de29bb diff --git a/modules/luci-base/root/lib/uci/upload/.placeholder b/modules/luci-base/root/lib/uci/upload/.placeholder deleted file mode 100644 index e69de29bb..000000000 -- cgit v1.2.3