From 6e8dc2a910adde579dd57158831d652f0e204676 Mon Sep 17 00:00:00 2001 From: Ted Trask Date: Tue, 13 Jan 2009 16:01:06 +0000 Subject: 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/chrony/trunk@1677 ab2d0c66-481e-0410-8bed-d214d4d58bed --- chrony-model.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chrony-model.lua b/chrony-model.lua index ec0301d..fa8e013 100644 --- a/chrony-model.lua +++ b/chrony-model.lua @@ -132,7 +132,7 @@ function get_config() output.keyfile = cfe({ label="Key File", descr="Name of key file (ie. /etc/chrony/chrony.keys)" }) output.commandkey = cfe({ label="Command Key", descr="Number of key in Key File for commands." }) - local config = format.parse_linesandwords(fs.read_file(configfile), "[!;#%%]") + local config = format.parse_linesandwords(fs.read_file(configfile) or "", "[!;#%%]") if config then for i,entry in ipairs(config) do if output[entry[1]] then -- cgit v1.2.3