diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2017-05-31 13:43:47 +0300 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2017-05-31 21:37:09 +0300 |
commit | d422b3654dbd34485a518c694f601e0b53ace0d6 (patch) | |
tree | 26da0e3b7c8f5ca8f945adf0d7719441f824a158 | |
parent | 63b54e44663130a522490bd08dc25fbf4e4852e9 (diff) | |
download | awall-d422b3654dbd34485a518c694f601e0b53ace0d6.tar.bz2 awall-d422b3654dbd34485a518c694f601e0b53ace0d6.tar.xz |
swap exit codes 1 and 2
-rwxr-xr-x | awall-cli | 10 |
1 files changed, 5 insertions, 5 deletions
@@ -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 |