summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2010-09-24 13:41:02 +0000
committerTed Trask <ttrask01@yahoo.com>2010-09-24 13:41:02 +0000
commit87321fa7aa82ac9665ede7c2bc9b896f1f0ef339 (patch)
treeed2c48088dc272174e48c50637125f70da5255b9
parent41b4039b6ba03629bac7ff5635000241eac15bca (diff)
downloadacf-alpine-baselayout-87321fa7aa82ac9665ede7c2bc9b896f1f0ef339.tar.bz2
acf-alpine-baselayout-87321fa7aa82ac9665ede7c2bc9b896f1f0ef339.tar.xz
Modified health storage for new output format of df in alpine 1.10
-rw-r--r--health-model.lua4
1 files changed, 2 insertions, 2 deletions
diff --git a/health-model.lua b/health-model.lua
index f5c0ee1..16b4d2a 100644
--- a/health-model.lua
+++ b/health-model.lua
@@ -58,7 +58,7 @@ get_storage = function (self)
local storage = {}
local disk = diskfree() .. "\n"
local other = {}
- for line in string.gmatch(disk, "([^\n]*)\n") do
+ for line in string.gmatch(disk, "\n([^\n]*\n[^\n]*)") do
if string.match(line, "^/dev/fd%d+") then
if not storage.floppy then
storage.floppy = cfe({ type="group", value={}, label="Floppy drives" })
@@ -70,7 +70,7 @@ get_storage = function (self)
if not storage.ramdisk then
storage.ramdisk = cfe({ type="group", value={}, label="RAM disks" })
end
- local name = string.match(line, "^%S+")
+ local name = string.match(line, "^(%S+)")
storage.ramdisk.value[name] = cfe({ value=string.match(disk, "[^\n]*\n")..line, label="RAM Disk Capacity" })
storage.ramdisk.value[name].used = string.match(line, name.."%s*%S*%s*%S*%s*%S*%s*(%S*)%%")
elseif string.match(line, "^/dev/") and not string.match(line, "^/dev/cdrom") and not string.match(line, "^/dev/loop") then