This commit is contained in:
Julian Brammer 2024-06-08 23:10:40 +02:00
parent 6ed699395f
commit e8d1c01fb7

View File

@ -4,7 +4,7 @@ local hash = require("lib.hash")
local systemConfig = basic.readFileAll("/brulijam/config/system.config") local systemConfig = basic.readFileAll("/brulijam/config/system.config")
systemConfig = textutils.unserialize(systemConfig) systemConfig = textutils.unserialize(systemConfig)
if os.getComputerLabel() == nil then if os.getComputerLabel() == nil or os.getComputerLabel() == "" then
local labelMainPart = string.sub(hash.digestStr(string.format(os.getComputerID())), 1, 6) local labelMainPart = string.sub(hash.digestStr(string.format(os.getComputerID())), 1, 6)
os.setComputerLabel(systemConfig["labelPrefix"] .. "-" .. labelMainPart) os.setComputerLabel(systemConfig["labelPrefix"] .. "-" .. labelMainPart)
end end