From ab98b8ccd4d1fe653382041bd1d8c0d1763c9029 Mon Sep 17 00:00:00 2001 From: Kaarle Ritvanen Date: Tue, 19 Feb 2013 13:44:03 +0000 Subject: allow defining after directive as string --- awall/policy.lua | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/awall/policy.lua b/awall/policy.lua index 418fb9a..585b04c 100644 --- a/awall/policy.lua +++ b/awall/policy.lua @@ -15,6 +15,7 @@ local raise = require('awall.uerror').raise local util = require('awall.util') local contains = util.contains +local list = util.list local PolicyConfig = class() @@ -157,8 +158,9 @@ function PolicySet:load() local data = policy:load() imported[policy.name] = data - if not data.after then data.after = util.copy(util.list(data.import)) end + if not data.after then data.after = util.copy(list(data.import)) end if not contains(data.before, '%defaults') then + data.after = list(data.after) table.insert(data.after, '%defaults') end -- cgit v1.2.3