diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-01-16 21:24:16 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-01-16 21:24:16 +0000 |
commit | 963f824d74f4263a1cfb826216814f4f83dc3de2 (patch) | |
tree | f4d393769c46c0a6f1acc034a0ab02a968e6be37 | |
parent | 7501c1e7414f71a44feef23937505bd3eb7e5c28 (diff) | |
download | acf-shorewall-963f824d74f4263a1cfb826216814f4f83dc3de2.tar.bz2 acf-shorewall-963f824d74f4263a1cfb826216814f4f83dc3de2.tar.xz |
Tested by removing expected packages, files, and directories. Fixed resulting bugs.
git-svn-id: svn://svn.alpinelinux.org/acf/shorewall/trunk@1683 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r-- | shorewall-model.lua | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/shorewall-model.lua b/shorewall-model.lua index d7682ab..694bb56 100644 --- a/shorewall-model.lua +++ b/shorewall-model.lua @@ -182,7 +182,7 @@ function getstatus() end function getstatusdetails() - local f = io.popen("/sbin/shorewall status") + local f = io.popen("/sbin/shorewall status 2>%1") local programstate = f:read("*a") or "" f:close() return cfe({ value=programstate, label="Shorewall status report" }) @@ -207,10 +207,12 @@ end function getfilelist () local listed_files = {} - for name in posix.files(baseurl) do - if not string.match(name, "^%.") and not string.match(name, "^Makefile") then - local filedetails = fs.stat(baseurl .. name) - table.insert ( listed_files , {filename=baseurl..name, mtime=filedetails.mtime, filesize=filedetails.size} ) + if fs.is_dir(baseurl) then + for name in posix.files(baseurl) do + if not string.match(name, "^%.") and not string.match(name, "^Makefile") then + local filedetails = fs.stat(baseurl .. name) + table.insert ( listed_files , {filename=baseurl..name, mtime=filedetails.mtime, filesize=filedetails.size} ) + end end end |