modules/luci-base: Move LuCI FileUpload directory to /etc/luci-uploads and save acros... 562/head
authorDaniel Dickinson <openwrt@daniel.thecshore.com>
Wed, 2 Dec 2015 02:36:30 +0000 (21:36 -0500)
committerDaniel Dickinson <openwrt@daniel.thecshore.com>
Sun, 13 Dec 2015 03:45:29 +0000 (22:45 -0500)
/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 <openwrt@daniel.thecshore.com>

modules/luci-base/Makefile
modules/luci-base/luasrc/cbi.lua
modules/luci-base/root/etc/luci-uploads/.placeholder [new file with mode: 0644]
modules/luci-base/root/lib/uci/upload/.placeholder [deleted file]

index 26cbe0820e1f1b5d2bdf0b3511f7ee62b62a93ad..a9c5e71cba7bb9472ff8ca72a6b9ef8da294998b 100644 (file)
@@ -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
index b5b2c8d8f201b5ca1cd3aec091720adfc83a0074..8fd0a337e2cb0a9cb3078382634a54699b6c7c4f 100644 (file)
@@ -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 (file)
index 0000000..e69de29
diff --git a/modules/luci-base/root/lib/uci/upload/.placeholder b/modules/luci-base/root/lib/uci/upload/.placeholder
deleted file mode 100644 (file)
index e69de29..0000000