diff options
author | Ted Trask <ttrask01@yahoo.com> | 2009-01-13 16:01:06 +0000 |
---|---|---|
committer | Ted Trask <ttrask01@yahoo.com> | 2009-01-13 16:01:06 +0000 |
commit | af94a865b1c9770311abeda58eec158407d58f49 (patch) | |
tree | f100ce98d3f809caad95625022448484f69b27b8 | |
parent | 4dbdcbc222bd78120539d2d4d04ecb985466a219 (diff) | |
download | acf-dnsmasq-af94a865b1c9770311abeda58eec158407d58f49.tar.bz2 acf-dnsmasq-af94a865b1c9770311abeda58eec158407d58f49.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/dnsmasq/trunk@1677 ab2d0c66-481e-0410-8bed-d214d4d58bed
-rw-r--r-- | dnsmasq-model.lua | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/dnsmasq-model.lua b/dnsmasq-model.lua index 3625cf8..1e6c5b8 100644 --- a/dnsmasq-model.lua +++ b/dnsmasq-model.lua @@ -203,7 +203,7 @@ function setconfig(config) local success, config = validateconfig(config) if success then - local file = fs.read_file(configfile) + local file = fs.read_file(configfile) or "" file = update_file(file,"domain",config.value.domain.value) file = update_file(file,"interface",config.value.interface.value) file = update_file(file,"listen-address",config.value.listen_address.value) |