Commit d422b365 authored by Kaarle Ritvanen's avatar Kaarle Ritvanen

swap exit codes 1 and 2

parent 63b54e44
......@@ -84,7 +84,7 @@ Show difference between modified and saved configurations:
(generated by the equivalent 'translate' command).
]])
os.exit(1)
os.exit(2)
end
if not arg[1] then help() end
......@@ -287,7 +287,7 @@ if not call(
elseif mode == 'diff' then
if not posix.stat(dumpfile) then
printmsg('Please translate or activate first')
os.exit(1)
os.exit(2)
end
local pid, stdin, stdout = lpc.run(
......@@ -321,7 +321,7 @@ if not call(
signal(
posix.SIGCHLD,
function()
if pid and lpc.wait(pid, 1) then os.exit(2) end
if pid and lpc.wait(pid, 1) then os.exit(1) end
end
)
for i, sig in ipairs({'INT', 'TERM'}) do
......@@ -348,7 +348,7 @@ if not call(
local function revert()
iptables.revert()
os.exit(1)
os.exit(2)
end
if call(config.activate, config) then
......@@ -393,4 +393,4 @@ if not call(
else assert(false) end
end
) then os.exit(1) end
) then os.exit(2) end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment