aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2012-10-23 10:04:10 +0000
committerKaarle Ritvanen <kaarle.ritvanen@datakunkku.fi>2012-10-23 10:04:10 +0000
commitb8a8482fac44fea2c34fabae0455094ed300a210 (patch)
tree918fc1f660166ebcf9a55161bb13ade18f0aed56
parent409f7a49f337c87f7fff4b4a0dd54a3ed3ede03f (diff)
downloadawall-b8a8482fac44fea2c34fabae0455094ed300a210.tar.bz2
awall-b8a8482fac44fea2c34fabae0455094ed300a210.tar.xz
search for optional policies in /etc/awall/optionalv0.2.12
-rw-r--r--Makefile6
-rw-r--r--awall/policy.lua3
2 files changed, 6 insertions, 3 deletions
diff --git a/Makefile b/Makefile
index 51dd0e1..3cd39e5 100644
--- a/Makefile
+++ b/Makefile
@@ -6,6 +6,7 @@ ROOT_DIR := /
LUA_VERSION := 5.1
poldir := usr/share/awall
+confdir := etc/awall
all: install
@@ -38,9 +39,10 @@ $(eval $(call copy,json,$(poldir)/mandatory,json))
$(eval $(call rename,awall-cli,usr/sbin/awall,755))
$(eval $(call rename,sample-policy.json,$(poldir)/sample/sample-policy.json,644))
-$(eval $(call mkdir,etc/awall))
-$(eval $(call mkdir,var/run/awall))
+$(eval $(call mkdir,$(confdir)))
+$(eval $(call mkdir,$(confdir)/optional))
$(eval $(call mkdir,$(poldir)/optional))
+$(eval $(call mkdir,var/run/awall))
install: $(foreach f,$(files),$(ROOT_DIR)/$(f))
diff --git a/awall/policy.lua b/awall/policy.lua
index 7c041b4..f2ebee0 100644
--- a/awall/policy.lua
+++ b/awall/policy.lua
@@ -113,7 +113,8 @@ PolicySet = awall.object.class()
function PolicySet:init(confdirs, importdirs)
self.autodirs = confdirs or {'/usr/share/awall/mandatory', '/etc/awall'}
self.confdir = self.autodirs[#self.autodirs]
- self.importdirs = importdirs or {'/usr/share/awall/optional'}
+ self.importdirs = importdirs or {'/usr/share/awall/optional',
+ '/etc/awall/optional'}
end