From owner-freebsd-current@FreeBSD.ORG Tue Aug 24 14:18:05 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 39EF516A4D4 for ; Tue, 24 Aug 2004 14:18:05 +0000 (GMT) Received: from mproxy.gmail.com (rproxy.gmail.com [64.233.170.195]) by mx1.FreeBSD.org (Postfix) with ESMTP id D64EC43D4C for ; Tue, 24 Aug 2004 14:18:04 +0000 (GMT) (envelope-from swhetzel@gmail.com) Received: by mproxy.gmail.com with SMTP id 77so95017rnl for ; Tue, 24 Aug 2004 07:18:04 -0700 (PDT) Received: by 10.38.15.69 with SMTP id 69mr911168rno; Tue, 24 Aug 2004 07:18:03 -0700 (PDT) Received: by 10.38.75.25 with HTTP; Tue, 24 Aug 2004 07:18:03 -0700 (PDT) Message-ID: <790a9fff0408240718231b1e4a@mail.gmail.com> Date: Tue, 24 Aug 2004 09:18:03 -0500 From: Scot Hetzel To: vip3r@inbox.ru In-Reply-To: <1093303561.15161.30.camel@vipehost.vipenet.lan> Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit References: <1093303561.15161.30.camel@vipehost.vipenet.lan> cc: freebsd-current@freebsd.org Subject: Re: 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: Scot Hetzel List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 24 Aug 2004 14:18:05 -0000 On Tue, 24 Aug 2004 03:26:02 +0400, vippy wrote: > 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: > : > > 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. > If you look at the man page for ntpd, the default configuration file is /etc/ntpd.conf, so you shouldn't need to specify '-c ' to the ntpd_flags variable. Also, you don't need the '-p ' in the ntpd_flags as it is the default. The required_files variable is to let the system administator know which file the ntpd configuration belongs in.