.
This commit is contained in:
parent
772cc6377f
commit
886aad9d00
5
src/brulijam/setLabel.lua
Normal file
5
src/brulijam/setLabel.lua
Normal file
@ -0,0 +1,5 @@
|
|||||||
|
local hash = require("lib.hash")
|
||||||
|
if os.getComputerLabel() == nil then
|
||||||
|
local labelMainPart = string.sub(hash.digestStr(string.format(os.getComputerID())), 1, 6)
|
||||||
|
os.setComputerLabel(labelPrefix .. "-" .. labelMainPart)
|
||||||
|
end
|
@ -4,23 +4,22 @@ local copyList = {
|
|||||||
[0] = "/brulijam/sync.lua",
|
[0] = "/brulijam/sync.lua",
|
||||||
[1] = "/startup.lua",
|
[1] = "/startup.lua",
|
||||||
[2] = "/brulijam/systemlock.lua"
|
[2] = "/brulijam/systemlock.lua"
|
||||||
|
[3] = "/brulijam/setLabel.lua"
|
||||||
|
|
||||||
[3] = "/brulijam/files/oreTable.txt",
|
[4] = "/brulijam/files/oreTable.txt",
|
||||||
|
|
||||||
[4] = "/brulijam/lib/aes.lua",
|
[5] = "/brulijam/lib/aes.lua",
|
||||||
[5] = "/brulijam/lib/hash.lua",
|
[6] = "/brulijam/lib/hash.lua",
|
||||||
[6] = "/brulijam/lib/basic.lua",
|
[7] = "/brulijam/lib/basic.lua",
|
||||||
[7] = "/brulijam/lib/networking.lua",
|
[8] = "/brulijam/lib/networking.lua",
|
||||||
|
|
||||||
[8] = "/brulijam/turtle-roomCreator.lua",
|
[9] = "/brulijam/turtle-roomCreator.lua",
|
||||||
[9] = "/brulijam/turtle-miner-stupidExcavate.lua",
|
[10] = "/brulijam/turtle-miner-stupidExcavate.lua",
|
||||||
[10] = "/brulijam/turtle-miner-fibo.lua",
|
[11] = "/brulijam/turtle-miner-fibo.lua",
|
||||||
[11] = "/brulijam/turtle-treeFarmer.lua",
|
[12] = "/brulijam/turtle-treeFarmer.lua",
|
||||||
|
|
||||||
[12] = "/brulijam/gps-tower.lua",
|
[13] = "/brulijam/gps-tower.lua",
|
||||||
[13] = "/brulijam/log-receiver.lua",
|
[14] = "/brulijam/log-receiver.lua",
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@ -24,12 +24,7 @@ shell.run("/brulijam/sync.lua")
|
|||||||
|
|
||||||
|
|
||||||
--set label if not set
|
--set label if not set
|
||||||
local hash = require("brulijam.lib.hash")
|
shell.run("/brulijam/setLabel.lua")
|
||||||
if os.getComputerLabel() == nil then
|
|
||||||
print("wuauw")
|
|
||||||
local labelMainPart = string.sub(hash.digestStr(string.format(os.getComputerID())), 1, 6)
|
|
||||||
os.setComputerLabel(labelPrefix .. "-" .. labelMainPart)
|
|
||||||
end
|
|
||||||
|
|
||||||
|
|
||||||
shell.run("/brulijam/systemlock.lua")
|
shell.run("/brulijam/systemlock.lua")
|
||||||
|
Loading…
Reference in New Issue
Block a user