summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Phillips <david@sighup.nz>2017-09-18 13:34:22 +1200
committerDavid Phillips <david@sighup.nz>2017-09-18 13:34:22 +1200
commitf93969f5c111deedc3b5830f743807372beeb9e3 (patch)
treee4a17df3b0e44853186dd843d20a52ead3f30064
parentfe1533f144b681c6bcd51edb39bcbdbd264de7ea (diff)
downloadinitscripts-f93969f5c111deedc3b5830f743807372beeb9e3.tar.xz
Make more use of macro paths
-rw-r--r--Makefile8
-rw-r--r--conf.d.in/iptables.in2
-rwxr-xr-xreplace.sh2
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