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

index 4e31f9d9bd21d764cad1e6dfa98b14bf50264176..54363e009a182cfd25768e1437824ab376817cca 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 c89c5859b91af9f76412abb0b77aeff9514e8a2a..ba592da2b9e524addbed487dffa86bd257bc3b67 100644 (file)
@@ -222,8 +222,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 8b711d511c6afd54699fe0167c76452a254878cc..3a5f12c527dabf3a3522c23619addec8f1fb56eb 100644 (file)
@@ -119,9 +119,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