From owner-svn-src-head@FreeBSD.ORG Mon Sep 8 12:26:53 2014 Return-Path: Delivered-To: svn-src-head@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id AD205A78; Mon, 8 Sep 2014 12:26:53 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 8D995151D; Mon, 8 Sep 2014 12:26:53 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s88CQrif039990; Mon, 8 Sep 2014 12:26:53 GMT (envelope-from des@FreeBSD.org) Received: (from des@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s88CQrUD039984; Mon, 8 Sep 2014 12:26:53 GMT (envelope-from des@FreeBSD.org) Message-Id: <201409081226.s88CQrUD039984@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: des set sender to des@FreeBSD.org using -f From: Dag-Erling Smørgrav Date: Mon, 8 Sep 2014 12:26:53 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271262 - in head/etc: defaults rc.d X-SVN-Group: head MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 08 Sep 2014 12:26:53 -0000 Author: des Date: Mon Sep 8 12:26:52 2014 New Revision: 271262 URL: http://svnweb.freebsd.org/changeset/base/271262 Log: Revert r271257 after several issues were pointed out. An updated patch will be committed at a later date. Modified: head/etc/defaults/rc.conf head/etc/rc.d/local_unbound Modified: head/etc/defaults/rc.conf ============================================================================== --- head/etc/defaults/rc.conf Mon Sep 8 12:11:49 2014 (r271261) +++ head/etc/defaults/rc.conf Mon Sep 8 12:26:52 2014 (r271262) @@ -267,13 +267,6 @@ hastd_program="/sbin/hastd" # path to ha hastd_flags="" # Optional flags to hastd. ctld_enable="NO" # CAM Target Layer / iSCSI target daemon. local_unbound_enable="NO" # local caching resolver -local_unbound_program="/usr/sbin/unbound" -local_unbound_workdir=/var/unbound -local_unbound_config="${local_unbound_workdir}/unbound.conf" -local_unbound_flags="-c${local_unbound_config}" -local_unbound_forwardconf="${local_unbound_workdir}/forward.conf}" -local_unbound_anchor="${local_unbound_workdir}/root.key" -local_unbound_forwarders="" # # kerberos. Do not run the admin daemons on slave servers Modified: head/etc/rc.d/local_unbound ============================================================================== --- head/etc/rc.d/local_unbound Mon Sep 8 12:11:49 2014 (r271261) +++ head/etc/rc.d/local_unbound Mon Sep 8 12:26:52 2014 (r271262) @@ -13,6 +13,7 @@ name="local_unbound" desc="local caching forwarding resolver" rcvar="local_unbound_enable" +command="/usr/sbin/unbound" extra_commands="anchor configtest reload setup" start_precmd="local_unbound_prestart" reload_precmd="local_unbound_configtest" @@ -21,9 +22,18 @@ configtest_cmd="local_unbound_configtest setup_cmd="local_unbound_setup" pidfile="/var/run/${name}.pid" +: ${local_unbound_workdir:=/var/unbound} +: ${local_unbound_config:=${local_unbound_workdir}/unbound.conf} +: ${local_unbound_flags:=-c${local_unbound_config}} +: ${local_unbound_forwardconf:=${local_unbound_workdir}/forward.conf} +: ${local_unbound_anchor:=${local_unbound_workdir}/root.key} +: ${local_unbound_forwarders:=} + +load_rc_config $name + do_as_unbound() { - echo "$@" | /usr/bin/su -m unbound + echo "$@" | su -m unbound } # @@ -31,8 +41,7 @@ do_as_unbound() # local_unbound_anchor() { - do_as_unbound ${local_unbound_program%/*}/unbound-anchor \ - -a ${local_unbound_anchor} + do_as_unbound /usr/sbin/unbound-anchor -a ${local_unbound_anchor} # we can't trust the exit code - check if the file exists [ -f ${local_unbound_anchor} ] } @@ -42,8 +51,7 @@ local_unbound_anchor() # local_unbound_configtest() { - do_as_unbound ${local_unbound_program%/*}/unbound-checkconf \ - ${local_unbound_config} + do_as_unbound /usr/sbin/unbound-checkconf ${local_unbound_config} } # @@ -53,7 +61,7 @@ local_unbound_configtest() local_unbound_setup() { echo "Performing initial setup." - ${local_unbound_program%/*}/local-unbound-setup -n \ + /usr/sbin/local-unbound-setup -n \ -u unbound \ -w ${local_unbound_workdir} \ -c ${local_unbound_config} \