summaryrefslogtreecommitdiff
path: root/rule_generator
diff options
context:
space:
mode:
Diffstat (limited to 'rule_generator')
-rw-r--r--rule_generator/rule_generator.functions4
1 files changed, 4 insertions, 0 deletions
diff --git a/rule_generator/rule_generator.functions b/rule_generator/rule_generator.functions
index a6e9c8c4d8..ea02acc4c7 100644
--- a/rule_generator/rule_generator.functions
+++ b/rule_generator/rule_generator.functions
@@ -76,6 +76,10 @@ choose_rules_file() {
local tmp_rules_file="$RUNDIR/tmp-rules--${RULES_FILE##*/}"
[ -e "$RULES_FILE" -o -e "$tmp_rules_file" ] || PRINT_HEADER=1
+ [ -d "${RULES_FILE%/*}" ] || if writeable ${RULES_FILE%/rules.d/*}; then
+ mkdir -p "${RULES_FILE%/*}"
+ fi
+
if writeable ${RULES_FILE%/*}; then
RO_RULES_FILE='/dev/null'
else