admin-full/admin-mini: Fixed backup module
authorSteven Barth <steven@midlink.org>
Fri, 19 Sep 2008 17:51:25 +0000 (17:51 +0000)
committerSteven Barth <steven@midlink.org>
Fri, 19 Sep 2008 17:51:25 +0000 (17:51 +0000)
libs/web/root/etc/config/luci
modules/admin-full/luasrc/controller/admin/system.lua
modules/admin-mini/luasrc/controller/mini/system.lua

index 40228b07fb8f13c1aa368c7e0f7208ec2ccef83c..f9b51c8030a791ea11e2189b9a7db1c2596c329e 100644 (file)
@@ -10,12 +10,11 @@ config core brand
        option distro   "Development Snapshot"
                
 config extern flash_keep
-       option uci      "/etc/config"
-       option dropbear "/etc/dropbear"
-       option openvpn  "/etc/openvpn"
+       option uci              "/etc/config/"
+       option dropbear "/etc/dropbear/"
+       option openvpn  "/etc/openvpn/"
        option passwd   "/etc/passwd"
-       option ipkg     "/etc/ipkg.conf"
-       option httpd    "/etc/httpd.conf"
+       option opkg             "/etc/opkg.conf"
        option firewall "/etc/firewall.user"
 
 config internal languages
index 5d64336e03ee7192b0a695de78ff7d0e443108f2..981d6255f28c4fea8bb7f09bbdf9b5a2929f8e2e 100644 (file)
@@ -221,8 +221,10 @@ function _keep_pattern()
        local files = luci.model.uci.cursor():get_all("luci", "flash_keep")
        if files then
                kpattern = ""
-               for k,v in pairs(files) do
-                       kpattern = kpattern .. " " ..  v
+               for k, v in pairs(files) do
+                       if k:sub(1,1) ~= "." and luci.fs.glob(v) then
+                               kpattern = kpattern .. " " ..  v
+                       end
                end
        end
        return kpattern
index 6d16ef8650e22c91e7ea1616f20384f8ccb5d4dd..a07918518f1f35fa5ad07e51782224c8e7429d62 100644 (file)
@@ -118,9 +118,11 @@ function _keep_pattern()
        local files = luci.model.uci.cursor():get_all("luci", "flash_keep")
        if files then
                kpattern = ""
-               for k,v in pairs(files) do
-                       kpattern = kpattern .. " " ..  v
+               for k, v in pairs(files) do
+                       if k:sub(1,1) ~= "." and luci.fs.glob(v) then
+                               kpattern = kpattern .. " " ..  v
+                       end
                end
        end
        return kpattern
-end
+end
\ No newline at end of file