diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2012-03-22 12:57:12 +0000 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2012-03-22 12:57:12 +0000 |
commit | 4dab1c77f6b7d758cc5fc5f1e1b14306bfafec00 (patch) | |
tree | edc837b16d356aeb8cebecab7672d5e9a88e45d8 /awall-cli | |
parent | 25f1c465c78f1eb6834f6e4fa77d5df066a23cd0 (diff) | |
download | awall-4dab1c77f6b7d758cc5fc5f1e1b14306bfafec00.tar.bz2 awall-4dab1c77f6b7d758cc5fc5f1e1b14306bfafec00.tar.xz |
make verification using ip[6]tables-restore optional
verification requires root privileges
Diffstat (limited to 'awall-cli')
-rwxr-xr-x | awall-cli | 8 |
1 files changed, 5 insertions, 3 deletions
@@ -10,8 +10,9 @@ require 'alt_getopt' require 'lfs' require 'stringy' -short_opts = 'o:' -long_opts = {['output-dir']='o'} +short_opts = 'o:V' +long_opts = {['output-dir']='o', + verify='V'} if stringy.endswith(arg[0], '/awall-cli') then basedir = string.sub(arg[0], 1, -11) @@ -26,6 +27,7 @@ for switch, value in pairs(alt_getopt.get_opts(arg, short_opts, long_opts)) do elseif switch == 'o' then iptdir = value ipsfile = value..'/ipset' + elseif switch == 'V' then verify = true else assert(false) end end @@ -34,5 +36,5 @@ require 'awall' awall.loadmodules(basedir) config = awall.Config.new(input) -config:test() +if verify then config:test() end config:dump(iptdir, ipsfile) |