local co = self.uci.get_all( config )
local sc = { }
+ if not co then
+ return false, 'Unable to load configuration "' .. config .. '"'
+ end
+
local function _uci_foreach( type, func )
local ok, err
for k, v in pairs(co) do
self.beenthere = { }
local co = self.uci.get_all( config )
+
+ if not co then
+ return false, 'Unable to load configuration "' .. config .. '"'
+ end
+
if co[section] then
return self:_validate_section( luci.uvl.section(
self, co, co[section]['.type'], config, section
self.beenthere = { }
local co = self.uci.get_all( config )
+
+ if not co then
+ return false, 'Unable to load configuration "' .. config .. '"'
+ end
+
if co[section] and co[section][option] then
return self:_validate_option( luci.uvl.option(
self, co, co[section]['.type'], config, section, option
local uvl = luci.uvl.UVL(
type(options.schemedir) == "string" and options.schemedir or nil
)
-
+
local cso = luci.util.split( arguments[1], "." )
local ok, err = uvl:validate( unpack(cso) )
if ok then
if not options.silent then
print( string.format(
- '%s "%s.%s.%s" validates fine!',
+ '%s "%s" validates fine!',
( #cso == 1 and "Config" or
( #cso == 2 and "Section" or "Option" ) ),
- cso[1], cso[2], cso[3]
+ table.concat(cso, ".")
) )
end
os.exit( 0 )