Skip to content

Commit

Permalink
Fix syslog running with HOSTNAME unset
Browse files Browse the repository at this point in the history
`computer.address` is a function and therefore must be called, not
method-called on directly.
  • Loading branch information
Hawk777 committed Jan 23, 2021
1 parent 4c462a5 commit 4f0efd2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions syslog/OpenOS/etc/rc.d/syslogd.lua
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ local serial = require "serialization"
local computer = require "computer"
local havenet, net = pcall(require,"minitel")

local hostname = os.getenv("HOSTNAME") or computer.address:sub(1,8)
local hostname = os.getenv("HOSTNAME") or computer.address():sub(1,8)
local cfg = {}
cfg.port = 514
cfg.relay = false
Expand Down Expand Up @@ -41,7 +41,7 @@ function reload()
f:close()
end
end
hostname = os.getenv("HOSTNAME") or computer.address:sub(1,8)
hostname = os.getenv("HOSTNAME") or computer.address():sub(1,8)
end

local function wentry(_,msg,level,service,host)
Expand Down

0 comments on commit 4f0efd2

Please sign in to comment.