1
0
mirror of https://github.com/ShadowKatStudios/OC-Minitel.git synced 2024-12-25 17:58:07 +11:00

Fix syslog running with HOSTNAME unset

`computer.address` is a function and therefore must be called, not
method-called on directly.
This commit is contained in:
Christopher Head 2021-01-22 19:11:26 -08:00
parent 4c462a5d4e
commit 4f0efd256c
No known key found for this signature in database
GPG Key ID: 889FF36E814738DE

View File

@ -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
@ -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)