]> git.e2factory.org Git - e2factory.git/commitdiff
e2lib: verify_global_config(): always check for existence of servers table
authorTobias Ulmer <tu@emlix.com>
Wed, 7 Sep 2016 15:30:17 +0000 (17:30 +0200)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:18 +0000 (15:41 +0100)
Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/e2lib.lua
global/e2-install-e2.lua

index b3474593c2d8e360ba09e122d743f3355ae3bc2b..e06c7990ff616f0ae1e5c100411e9cca174e3c5a 100644 (file)
@@ -881,6 +881,11 @@ local function verify_global_config(config)
         return false, re
     end
 
+    rc, re = assert_type(config.servers, "config.servers", "table")
+    if not rc then
+        return false, re
+    end
+
     return true
 end
 
index 932766666d4e642601419e319d0aa1970d462ad7..7499cd7cd32826c45256e8bfbf4b474a37096bcb 100644 (file)
@@ -69,11 +69,6 @@ local function e2_install_e2(arg)
         error(re)
     end
 
-    local servers = config.servers
-    if not servers then
-        error(err.new("no servers configured in global config"))
-    end
-
     local scache, re = cache.setup_cache(config)
     if not scache then
         error(e:cat(re))