diff options
author | Mika Havela <mika.havela@gmail.com> | 2008-01-25 15:29:41 +0000 |
---|---|---|
committer | Mika Havela <mika.havela@gmail.com> | 2008-01-25 15:29:41 +0000 |
commit | c4432acef0234d1ca0cfb2f610dc51bdee520bfc (patch) | |
tree | ee7c260c29cd6b07fa113ee84ba0d94c98185c8b | |
parent | 39d2fa39bf2ca5af6dae40a31a6bb6b615f74bed (diff) | |
download | acf-alpine-baselayout-c4432acef0234d1ca0cfb2f610dc51bdee520bfc.tar.bz2 acf-alpine-baselayout-c4432acef0234d1ca0cfb2f610dc51bdee520bfc.tar.xz |
Changed code to reflect changes in lib/format.lua
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@653 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r-- | health-model.lua | 2 | ||||
-rw-r--r-- | password-model.lua | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/health-model.lua b/health-model.lua index 374368d..e99c139 100644 --- a/health-model.lua +++ b/health-model.lua @@ -24,7 +24,7 @@ end local function getpercentage ( data,grep,field1,field2 ) local debugoutput = "" - local grepline = format.string_to_table("%s+" ,string.match(data,grep .. ".*")) + local grepline = format.string_to_table(string.match(data,grep .. ".*"),"%s+") local val1percentage = math.floor(((grepline[field1] / (grepline[field1]+grepline[field2]))*100)+0.5) return val1percentage end diff --git a/password-model.lua b/password-model.lua index 2f81bff..e4dfb22 100644 --- a/password-model.lua +++ b/password-model.lua @@ -7,7 +7,7 @@ require "format" get = function (self) --hardcoded for root now f = format.search_for_lines("/etc/shadow", "root:") - temp = format.string_to_table(":", f) + temp = format.string_to_table(f,":") if temp[2] == "!" then status = "not set" else |