aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2017-05-31 13:43:47 +0300
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2017-05-31 21:37:09 +0300
commitd422b3654dbd34485a518c694f601e0b53ace0d6 (patch)
tree26da0e3b7c8f5ca8f945adf0d7719441f824a158
parent63b54e44663130a522490bd08dc25fbf4e4852e9 (diff)
downloadawall-d422b3654dbd34485a518c694f601e0b53ace0d6.tar.bz2
awall-d422b3654dbd34485a518c694f601e0b53ace0d6.tar.xz
swap exit codes 1 and 2
-rwxr-xr-xawall-cli10
1 files changed, 5 insertions, 5 deletions
diff --git a/awall-cli b/awall-cli
index cdf08a2..9055ab0 100755
--- a/awall-cli
+++ b/awall-cli
@@ -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