diff options
author | Michael Unterkalmsteiner <miciu@gmx.de> | 2009-11-11 20:57:29 +0100 |
---|---|---|
committer | Adrian C. (anrxc) <anrxc@sysphere.org> | 2009-11-12 01:41:57 +0100 |
commit | 1790abb0eddaeb2c19017711f5d33e978d74b199 (patch) | |
tree | 67eae3a061515b927a72b2c5c6121efb6ac0eaf6 /hddtemp.lua | |
parent | 249294551e91b84a0c8bd81f128db8c749651677 (diff) | |
download | vicious-legacy-1790abb0eddaeb2c19017711f5d33e978d74b199.tar.xz |
hddtemp: adapt regex to match disks like /dev/sg0
The regular expression did not match the following output from
hddtemp: |/dev/sg0|ST9160823ASG|38|C|. Fixed by allowing digits in the
"disk" part of the expression.
Signed-off-by: Michael Unterkalmsteiner <miciu@gmx.de>
Signed-off-by: Adrian C. (anrxc) <anrxc@sysphere.org>
Diffstat (limited to 'hddtemp.lua')
-rw-r--r-- | hddtemp.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/hddtemp.lua b/hddtemp.lua index fe516e8..a2557fa 100644 --- a/hddtemp.lua +++ b/hddtemp.lua @@ -25,7 +25,7 @@ local function worker(format, port) local hdd_temp = {} for line in f:lines() do - local disk, temp = string.match(line, "|([%/%a]+)|.*|([%d]+)|[CF]+|") + local disk, temp = string.match(line, "|([%/%a%d]+)|.*|([%d]+)|[CF]+|") if disk ~= nil and temp ~= nil then hdd_temp["{"..disk.."}"] = tonumber(temp) |