Package: qcontrol Version: 0.4.2+svn-r40-3 Severity: wishlist Tags: patch Hi Ian,
the attached patch loads "/etc/qcontrol/local.lua" if it exists and has no errors. Maybe this should not be only for ts41x.lua :) Hanno -- System Information: Debian Release: 7.0 APT prefers testing-updates APT policy: (500, 'testing-updates'), (500, 'testing') Architecture: armel (armv5tel) Kernel: Linux 3.2.0-4-kirkwood Locale: LANG=C.UTF-8, LC_CTYPE=C.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Versions of packages qcontrol depends on: ii libc6 2.13-37 ii liblua5.1-0 5.1.5-4 ii udev 175-7 qcontrol recommends no packages. qcontrol suggests no packages. -- Configuration Files: /etc/qcontrol/ts41x.lua changed [not included] -- no debconf information
--- ts41x.lua.OLD 2012-11-25 12:59:02.000000000 +0100 +++ ts41x.lua 2013-01-06 19:24:15.912821093 +0100 @@ -134,3 +134,25 @@ setfan("silence") end end + +function load_local_conf () + local conf_file = "/etc/qcontrol/local.lua" + local res + + local data, err = loadfile(conf_file) + if data == nil then + logprint("error with "..conf_file..": "..err) + return + end + + res, err = pcall(data) + if not res then + logprint("error calling "..conf_file..": "..err) + return + end + + logprint("successfully loaded "..conf_file) + return +end + +load_local_conf()