summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-01-16 21:24:16 +0000
committerTed Trask <ttrask01@yahoo.com>2009-01-16 21:24:16 +0000
commitae5252d486b4ed57c8ce6994b6803ec32fe9810d (patch)
tree0bd5ca7cd62950bd7bfcca1e00e87cb9ef2fff6a
parent46ea286ecd9626fa9002e939676b18fe6fba26d6 (diff)
downloadacf-alpine-conf-ae5252d486b4ed57c8ce6994b6803ec32fe9810d.tar.bz2
acf-alpine-conf-ae5252d486b4ed57c8ce6994b6803ec32fe9810d.tar.xz
Tested by removing expected packages, files, and directories. Fixed resulting bugs.
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-conf/trunk@1683 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r--lbu-listchanges-html.lsp2
-rw-r--r--lbu-model.lua11
2 files changed, 8 insertions, 5 deletions
diff --git a/lbu-listchanges-html.lsp b/lbu-listchanges-html.lsp
index 42d6387..d49d010 100644
--- a/lbu-listchanges-html.lsp
+++ b/lbu-listchanges-html.lsp
@@ -35,7 +35,7 @@ end %>
io.write("None")
else
for i,file in pairs(view.value) do
- io.write(html.html_escape(file.status .. "\t" .. file.name .. "\n"))
+ io.write((html.html_escape(file.status .. "\t" .. file.name .. "\n")))
end
end
%></pre></DD>
diff --git a/lbu-model.lua b/lbu-model.lua
index f3cd3b6..b5f9942 100644
--- a/lbu-model.lua
+++ b/lbu-model.lua
@@ -415,11 +415,14 @@ end
--]]
function getbackupfiles()
local files = {}
- local f = io.popen("PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin lbu lb 2>&1", "r")
- for line in f:lines() do
- files[#files + 1] = line
- end
+ local f = io.popen("PATH=/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin lbu lb 2>/dev/null", "r")
+ local content = f:read("*a") or ""
f:close()
+ if not string.match(content, "usage: lbu") then
+ for line in string.gmatch(content, "([^\n]+)\n?") do
+ files[#files + 1] = line
+ end
+ end
return cfe({ type="list", value=files, label="Backup archive list"})
end