18 lines
No EOL
414 B
Text
18 lines
No EOL
414 B
Text
local tArgs = { ... }
|
|
if #tArgs < 1 then
|
|
kerneldraw.printAppInfo("net", kernel.getHostname())
|
|
else
|
|
if tArgs[1] == "--set" then
|
|
if #tArgs >= 2 then
|
|
local hostname = tArgs[2]
|
|
for i,v in ipairs(tArgs) do
|
|
if not (i == 1 or i == 2) then
|
|
hostname = hostname .. tArgs[i]
|
|
end
|
|
end
|
|
kernel.setHostname(hostname)
|
|
end
|
|
else
|
|
kerneldraw.printAppInfo("hostname","Arguments not specified")
|
|
end
|
|
end |