Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
awall
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
7
Issues
7
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Environments
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
alpine
awall
Commits
d5d5baee
Commit
d5d5baee
authored
Jul 13, 2012
by
Kaarle Ritvanen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
support for configuration-dependent default rules
parent
ad5655a4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
awall/init.lua
awall/init.lua
+6
-2
No files found.
awall/init.lua
View file @
d5d5baee
...
...
@@ -33,7 +33,7 @@ function loadmodules(path)
end
for
phase
,
rules
in
pairs
(
mod
.
defrules
)
do
if
not
defrules
[
phase
]
then
defrules
[
phase
]
=
{}
end
util
.
extend
(
defrules
[
phase
],
rules
)
table.insert
(
defrules
[
phase
],
rules
)
end
end
...
...
@@ -87,7 +87,11 @@ function Config:init(policyconfig)
end
local
function
insertdefrules
(
phase
)
if
defrules
[
phase
]
then
insertrules
(
defrules
[
phase
])
end
for
i
,
rulegroup
in
ipairs
(
defrules
[
phase
]
or
{})
do
if
type
(
rulegroup
)
==
'function'
then
insertrules
(
rulegroup
(
self
.
input
))
else
insertrules
(
rulegroup
)
end
end
end
for
i
,
path
in
ipairs
(
procorder
)
do
morph
(
path
,
classmap
[
path
])
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment