From: Tobias Ulmer Date: Fri, 8 Nov 2013 18:07:59 +0000 (+0100) Subject: We don't use hostname for anything, remove the code X-Git-Tag: e2factory-2.3.15rc1~402 X-Git-Url: https://git.e2factory.org/?a=commitdiff_plain;h=aba279fd88e0cd258a5a06ee81ed7d4be1ece6b0;p=e2factory.git We don't use hostname for anything, remove the code Another io.popen call bites the dust. Signed-off-by: Tobias Ulmer --- diff --git a/generic/e2lib.lua b/generic/e2lib.lua index 62bdaf1..013c492 100644 --- a/generic/e2lib.lua +++ b/generic/e2lib.lua @@ -81,7 +81,6 @@ e2lib.globals = { -- variables initialized in init() username = nil, homedir = nil, - hostname = nil, env = {}, tmpdirs = {}, tmpfiles = {}, @@ -374,18 +373,6 @@ function e2lib.init() e2lib.globals.tmpdir = e2lib.globals.osenv["TMPDIR"] end - -- get the host name - local hostname = io.popen("hostname") - if not hostname then - return false, err.new("execution of \"hostname\" failed") - end - - e2lib.globals.hostname = hostname:read("*a") - hostname:close() - if not e2lib.globals.hostname then - return false, err.new("hostname ist not set") - end - e2lib.globals.lock = lock.new() return true