From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 15D14139694 for ; Thu, 25 May 2017 15:05:00 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id AA25D21C088; Thu, 25 May 2017 15:04:58 +0000 (UTC) Received: from smtp.gentoo.org (dev.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 7BC1B21C088 for ; Thu, 25 May 2017 15:04:58 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 91EDE33FE7D for ; Thu, 25 May 2017 15:04:56 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 326A1745D for ; Thu, 25 May 2017 15:04:55 +0000 (UTC) From: "Sven Wegener" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sven Wegener" Message-ID: <1495724686.1239acdd275f14d813a31f9eff157f5d6617dc65.swegener@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-dns/pdns/files/, net-dns/pdns/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-dns/pdns/files/pdns-r1 net-dns/pdns/pdns-4.0.3-r2.ebuild net-dns/pdns/pdns-4.0.3-r3.ebuild X-VCS-Directories: net-dns/pdns/files/ net-dns/pdns/ X-VCS-Committer: swegener X-VCS-Committer-Name: Sven Wegener X-VCS-Revision: 1239acdd275f14d813a31f9eff157f5d6617dc65 X-VCS-Branch: master Date: Thu, 25 May 2017 15:04:55 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 8bba2de4-8914-459c-b0af-e392b2d01ec8 X-Archives-Hash: 9ddd23348bfc6b86fbfb5dc4668399f0 commit: 1239acdd275f14d813a31f9eff157f5d6617dc65 Author: Sven Wegener gentoo org> AuthorDate: Sun May 14 13:26:22 2017 +0000 Commit: Sven Wegener gentoo org> CommitDate: Thu May 25 15:04:46 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=1239acdd net-dns/pdns: Update init script Package-Manager: Portage-2.3.5, Repoman-2.3.2 net-dns/pdns/files/pdns-r1 | 33 +++++++++++----------- .../{pdns-4.0.3-r2.ebuild => pdns-4.0.3-r3.ebuild} | 0 2 files changed, 16 insertions(+), 17 deletions(-) diff --git a/net-dns/pdns/files/pdns-r1 b/net-dns/pdns/files/pdns-r1 index a7a8c1ebfb9..76c4a3f1bbf 100644 --- a/net-dns/pdns/files/pdns-r1 +++ b/net-dns/pdns/files/pdns-r1 @@ -3,10 +3,16 @@ # Distributed under the terms of the GNU General Public License v2 PDNS_CONFIGDIR="${PDNS_CONFIGDIR:-/etc/powerdns}" -PDNS_SOCKETDIR="${PDNS_SOCKETDIR:-/var/lib/powerdns}" PDNS_STOP_TIMEOUT="${PDNS_STOP_TIMEOUT:-10}" -name="PowerDNS Authoritative Server" +[ "${RC_SVCNAME}" != "pdns" ] && PDNS_INSTANCE="${RC_SVCNAME#pdns[.-]}" || PDNS_INSTANCE="" + +PDNS_CONFIG="${PDNS_CONFIGDIR}/pdns${PDNS_INSTANCE:+-${PDNS_INSTANCE}}.conf" +PDNS_CHROOTDIR="$( awk -F = '$1 == "chroot" { print $2 }' "${PDNS_CONFIG}" )" +PDNS_SOCKETDIR="$( awk -F = '$1 == "socket-dir" { print $2 }' "${PDNS_CONFIG}" )" +[ -z "${PDNS_SOCKETDIR}" -a -z "${PDNS_CHROOTDIR}" ] && PDNS_SOCKETDIR="/var/run" + +name="PowerDNS Authoritative Server${PDNS_INSTANCE:+ (${PDNS_INSTANCE})}" description="Authoritative name server" extra_started_commands="dump ping" @@ -16,19 +22,12 @@ description_ping="Ping the PowerDNS instance" description_monitor="Starts in foreground with logging and console enabled" command="/usr/sbin/pdns_server" -command_args="--config-dir=${PDNS_CONFIGDIR} --socket-dir=${PDNS_SOCKETDIR}" +command_args="--config-dir=${PDNS_CONFIGDIR}${PDNS_INSTANCE:+ --config-name=${PDNS_INSTANCE}}" command_args_foreground="--daemon=no" command_args_background="--daemon=yes" yesno ${rc_verbose} || command_args_background="${command_args_background} >/dev/null 2>&1" -if [ "${RC_SVCNAME}" != "pdns" ]; then - PDNS_INSTANCE="${RC_SVCNAME#pdns[.-]}" - name="${name} (${PDNS_INSTANCE})" - command_args="${command_args} --config-name=${PDNS_INSTANCE}" - pidfile="${PDNS_SOCKETDIR}/pdns-${PDNS_INSTANCE}.pid" -else - pidfile="${PDNS_SOCKETDIR}/pdns.pid" -fi +pidfile="${PDNS_CHROOTDIR}/${PDNS_SOCKETDIR}/pdns${PDNS_INSTANCE:+-${PDNS_INSTANCE}}.pid" control_command="/usr/bin/pdns_control" control_command_args="${command_args}" @@ -60,7 +59,7 @@ wait_for_stop() { return 0 fi : $(( timeout -= 1 )) - echo -n . + printf . done echo @@ -85,11 +84,11 @@ ping() { monitor() { einfo "Starting ${name} in monitor mode" - echo "" - echo "************************************************" - echo "* Use \"QUIT\" or Ctrl-C to end monitoring mode! *" - echo "************************************************" - echo "" + echo + echo '************************************************' + echo '* Use "QUIT" or Ctrl-C to end monitoring mode! *' + echo '************************************************' + echo ${command} \ ${command_args} \ diff --git a/net-dns/pdns/pdns-4.0.3-r2.ebuild b/net-dns/pdns/pdns-4.0.3-r3.ebuild similarity index 100% rename from net-dns/pdns/pdns-4.0.3-r2.ebuild rename to net-dns/pdns/pdns-4.0.3-r3.ebuild