diff options
author | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2012-06-28 10:05:31 +0000 |
---|---|---|
committer | Kaarle Ritvanen <kaarle.ritvanen@datakunkku.fi> | 2012-06-28 10:05:31 +0000 |
commit | 520c88ef97f8b45ce133254b54426b25d9d37da2 (patch) | |
tree | 36411497061901371599a92d9577067a073655f1 | |
parent | b79700a68ee70a1d378531286b89af8048ef9311 (diff) | |
download | awall-520c88ef97f8b45ce133254b54426b25d9d37da2.tar.bz2 awall-520c88ef97f8b45ce133254b54426b25d9d37da2.tar.xz |
use shorthand for awall.util in awall-cli
-rwxr-xr-x | awall-cli | 11 |
1 files changed, 6 insertions, 5 deletions
@@ -92,10 +92,11 @@ end require 'awall.util' +util = awall.util -if not awall.util.contains({'translate', 'activate', 'fallback', - 'enable', 'disable', 'list', 'dump'}, - mode) then help() end +if not util.contains({'translate', 'activate', 'fallback', + 'enable', 'disable', 'list', 'dump'}, + mode) then help() end require 'awall' @@ -103,11 +104,11 @@ require 'awall' policyset = awall.PolicySet.new(params.i, params.I) if mode == 'list' then - awall.util.printtabular(policyset:list()) + util.printtabular(policyset:list()) os.exit() end -if awall.util.contains({'disable', 'enable'}, mode) then +if util.contains({'disable', 'enable'}, mode) then if opind > #arg then help() end repeat policyset[mode](policyset, arg[opind]) |