From f93969f5c111deedc3b5830f743807372beeb9e3 Mon Sep 17 00:00:00 2001 From: David Phillips Date: Mon, 18 Sep 2017 13:34:22 +1200 Subject: Make more use of macro paths --- Makefile | 8 ++++---- conf.d.in/iptables.in | 2 +- replace.sh | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/Makefile b/Makefile index 54488cc..44dd2b9 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ -export OPENRC_RUN = /usr/bin/openrc-run -export BINDIR = /usr/bin - -SYSCONFDIR ?= etc +export OPENRC_RUN ?= /usr/bin/openrc-run +export BINDIR ?= /usr/bin +export SYSCONFDIR ?= /etc +export OPENRC_DIR ?= /etc MACRO_PROG = ./replace.sh INIT_FILES = $(shell find init.d.in -type f | sed -e 's/\.in$$//g' -e 's/init\.d\.in/init.d/g') diff --git a/conf.d.in/iptables.in b/conf.d.in/iptables.in index ded05a4..d9b2f7a 100644 --- a/conf.d.in/iptables.in +++ b/conf.d.in/iptables.in @@ -1 +1 @@ -iptables_save="/etc/iptables/iptables.rules" +iptables_save="@SYSCONFDIR@/iptables/iptables.rules" diff --git a/replace.sh b/replace.sh index 5bde2bd..0359b9b 100755 --- a/replace.sh +++ b/replace.sh @@ -11,6 +11,8 @@ sedargs="" for var in \ BINDIR \ OPENRC_RUN \ + SYSCONFDIR \ + OPENRC_DIR \ ; do sedargs="${sedargs} -e s:\@${var}\@:${!var}:g " done -- cgit v1.1