summaryrefslogtreecommitdiffstats
path: root/syslog-model.lua
diff options
context:
space:
mode:
authorTed Trask <ttrask01@yahoo.com>2009-01-13 16:01:06 +0000
committerTed Trask <ttrask01@yahoo.com>2009-01-13 16:01:06 +0000
commit5ec7a43c6f0a6cd1369da101fa0e3f1f12d99973 (patch)
tree89b5c319d2f14352e25260d5fbf3ec67f85ca636 /syslog-model.lua
parent9dfc491513676fa005f68cc764c4db37f0b3094f (diff)
downloadacf-alpine-baselayout-5ec7a43c6f0a6cd1369da101fa0e3f1f12d99973.tar.bz2
acf-alpine-baselayout-5ec7a43c6f0a6cd1369da101fa0e3f1f12d99973.tar.xz
Modified fs.lua to survive nil parameters. Added create_directory and used within create_file and write_file. Reviewed each read_file call to make sure handles nil return value.
git-svn-id: svn://svn.alpinelinux.org/acf/alpine-baselayout/trunk@1677 ab2d0c66-481e-0410-8bed-d214d4d58bed
Diffstat (limited to 'syslog-model.lua')
-rw-r--r--syslog-model.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/syslog-model.lua b/syslog-model.lua
index 38920b3..ac6904f 100644
--- a/syslog-model.lua
+++ b/syslog-model.lua
@@ -180,7 +180,7 @@ end
function getconfig()
local config = {}
if (fs.is_file(configfile)) then
- local configcontent = format.opts_to_table(string.sub((format.parse_ini_file(fs.read_file(configfile), "", "SYSLOGD_OPTS") or ""),2,-2))
+ local configcontent = format.opts_to_table(string.sub((format.parse_ini_file(fs.read_file(configfile) or "", "", "SYSLOGD_OPTS") or ""),2,-2))
config = makeconfig(configcontent)
else
config = makeconfig()