From 8e5b0e862a71f5d454f90e09378459ac3dd0ca91 Mon Sep 17 00:00:00 2001 From: yjqg6666 Date: Sun, 17 Dec 2023 18:31:20 -0800 Subject: [PATCH] dns/coredns: change working directory to load extra config files PR: 275205 --- dns/coredns/Makefile | 2 +- dns/coredns/files/coredns.in | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dns/coredns/Makefile b/dns/coredns/Makefile index 16034b7653c8..a130ab8dffb7 100644 --- a/dns/coredns/Makefile +++ b/dns/coredns/Makefile @@ -1,7 +1,7 @@ PORTNAME= coredns DISTVERSIONPREFIX= v DISTVERSION= 1.11.1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= dns MAINTAINER= yuri@FreeBSD.org diff --git a/dns/coredns/files/coredns.in b/dns/coredns/files/coredns.in index c7e998a02093..fb5af7605464 100644 --- a/dns/coredns/files/coredns.in +++ b/dns/coredns/files/coredns.in @@ -37,8 +37,8 @@ command_args="-S -m 3 -s "info" -l "daemon" -p ${pidfile} /usr/bin/env ${procnam coredns_precmd() { - /usr/bin/install -d -m 0755 \ - %%PREFIX%%/etc/coredns + /usr/bin/install -d -m 0755 %%PREFIX%%/etc/coredns && \ + cfg_dir=$(dirname "${coredns_config}") && cd "$cfg_dir" } run_rc_command "$1"