From owner-freebsd-current@FreeBSD.ORG Mon Aug 23 23:26:56 2004 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 3447516A4D0 for ; Mon, 23 Aug 2004 23:26:56 +0000 (GMT) Received: from mx1.mail.ru (mx1.mail.ru [194.67.23.121]) by mx1.FreeBSD.org (Postfix) with ESMTP id 56A4843D64 for ; Mon, 23 Aug 2004 23:26:55 +0000 (GMT) (envelope-from vip3r@inbox.ru) Received: from [195.131.106.162] (port=61874 helo=[10.10.10.98]) by mx1.mail.ru with esmtp id 1BzODF-000Mmj-00 for freebsd-current@freebsd.org; Tue, 24 Aug 2004 03:26:53 +0400 From: vippy To: freebsd-current@freebsd.org Content-Type: text/plain Organization: vipenet Message-Id: <1093303561.15161.30.camel@vipehost.vipenet.lan> Mime-Version: 1.0 X-Mailer: Ximian Evolution 1.4.6 Date: Tue, 24 Aug 2004 03:26:02 +0400 Content-Transfer-Encoding: 7bit X-Spam: Not detected Subject: from src/etc/rc.d/ntpd: required_files="/etc/ntp.conf" X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list Reply-To: vip3r@inbox.ru List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 23 Aug 2004 23:26:56 -0000 I'm wondering having in my rc.conf legal assignment: ntpd_flags="-A -c /etc/ntpd.conf -f /var/db/ntpd.drift \ -l /var/log/ntpd.log -p /var/run/ntpd.pid" Why /etc/rc.d/ntpd script requires /etc/ntp.conf file as a config file for NTP daemon? This file even isn't exist by default (cause ntpd is contributed software, right?), so system administrator should create new file, named by his own rules. Often it'll be ${name}.conf -> ntpd.conf. So i see there 3 different ways to fix this (wrong?) behavior: 1) Simply fix src/rc.d/ntpd (here's THE PATCH =)) "--- /etc/rc.d/ntpd Tue Aug 24 03:12:38 2004 +++ /usr/src/etc/rc.d/ntpd Sat Jul 3 01:38:57 2004 @@ -15,7 +15,7 @@ rcvar=`set_rcvar` command="/usr/sbin/${name}" pidfile="/var/run/${name}.pid" -required_files="/etc/${name}.conf" +required_files="/etc/ntp.conf" ntpd_precmd() {" 2) Add new variable "ntpd_conf" to rc.conf (and use it in etc/rc.d/ntpd rc.ng) which will represent path to ntpd config file (default to etc/ntpd.conf in etc/defaults/rc.conf). 3) Somehow (gtopt(1)?) parse ntpd_flags variable from rc.conf to find what is after "-c" and use it in etc/rc.d/ntpd. Thanks, for your attention.