]> git.e2factory.org Git - e2factory.git/commitdiff
We don't use hostname for anything, remove the code
authorTobias Ulmer <tu@emlix.com>
Fri, 8 Nov 2013 18:07:59 +0000 (19:07 +0100)
committerTobias Ulmer <tu@emlix.com>
Wed, 16 Nov 2016 14:41:16 +0000 (15:41 +0100)
Another io.popen call bites the dust.

Signed-off-by: Tobias Ulmer <tu@emlix.com>
generic/e2lib.lua

index 62bdaf1cbab897af65cf43f954ed4777220e9843..013c492944fa59c530c1ce78fb549621b0c20227 100644 (file)
@@ -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