From c4432acef0234d1ca0cfb2f610dc51bdee520bfc Mon Sep 17 00:00:00 2001 From: Mika Havela Date: Fri, 25 Jan 2008 15:29:41 +0000 Subject: 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 --- health-model.lua | 2 +- 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 -- cgit v1.2.3