1
0
mirror of https://github.com/AR2000AR/openComputers_codes.git synced 2025-09-08 22:51:14 +02:00
Files
openComputers_codes/network/bin/ifdown.lua

12 lines
334 B
Lua

local ifconfig = require("ifconfig")
local shell = require("shell")
local args, opts = shell.parse(...)
local lv = ifconfig.logLevel
if (opts.v) then ifconfig.logLevel = ifconfig.logLevel + 1 end
if (opts.q) then ifconfig.logLevel = ifconfig.logLevel - 1 end
if (args[1]) then
ifconfig.ifdown(args[1])
end
ifconfig.logLevel = lv