diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-09-07 15:10:18 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-09-07 15:10:18 +0000 |
commit | 1acd3b8975e1a26ab93a2e3a157da3fd820b7893 (patch) | |
tree | 4d0bb8153f09b15df4d075180fa57a97667083f1 /lib | |
parent | 1bf4143ca13acfe1ac8720f980b84943f2f382be (diff) | |
download | acf-core-1acd3b8975e1a26ab93a2e3a157da3fd820b7893.tar.bz2 acf-core-1acd3b8975e1a26ab93a2e3a157da3fd820b7893.tar.xz |
Yet another bug fix for /lib/processinfo.lua read_initrunlevels to add back all scripts.
Diffstat (limited to 'lib')
-rw-r--r-- | lib/processinfo.lua | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/processinfo.lua b/lib/processinfo.lua index 5400f92..fd554d8 100644 --- a/lib/processinfo.lua +++ b/lib/processinfo.lua @@ -46,9 +46,13 @@ function read_initrunlevels() local cmdresult = f:read("*a") or "" f:close() for line in string.gmatch(cmdresult, "([^\n]*)\n?") do - local service, runlevels = string.match(line, "^%s*(%w+) |%s*(%S.*)") + local service = string.match(line, "^%s*(%w+)") + local runlevels = string.match(line, "|%s*(%S.*)") if service then - local runlevel = format.string_to_table(string.gsub(runlevels, "%s+$", ""), "%s+") or {} + local runlevel = {} + if runlevels then + runlevel = format.string_to_table(string.gsub(runlevels, "%s+$", ""), "%s+") or {} + end config[#config+1] = {servicename=service, runlevels=runlevel} end end |