From owner-svn-src-all@FreeBSD.ORG Tue Jun 18 02:37:15 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) by hub.freebsd.org (Postfix) with ESMTP id 934D01BE; Tue, 18 Jun 2013 02:37:15 +0000 (UTC) (envelope-from dteske@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 861A61074; Tue, 18 Jun 2013 02:37:15 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5I2bFw1048467; Tue, 18 Jun 2013 02:37:15 GMT (envelope-from dteske@svn.freebsd.org) Received: (from dteske@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5I2bFJF048466; Tue, 18 Jun 2013 02:37:15 GMT (envelope-from dteske@svn.freebsd.org) Message-Id: <201306180237.r5I2bFJF048466@svn.freebsd.org> From: Devin Teske Date: Tue, 18 Jun 2013 02:37:15 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r251885 - head/etc/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-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 18 Jun 2013 02:37:15 -0000 Author: dteske Date: Tue Jun 18 02:37:15 2013 New Revision: 251885 URL: http://svnweb.freebsd.org/changeset/base/251885 Log: Allow $ntpdate_config to be NULL. Due to a lack of surrounding quotes, when ntpdate_config was set to NULL the conditional would (counter to prevailing logic) succeed -- leading to awk attempting to redirect from a NULL pathname standard-in. While we're here, make the script consistant with itself by removing the {curlies} around ntpdate_config (they are unnecessary). Modified: head/etc/rc.d/ntpdate Modified: head/etc/rc.d/ntpdate ============================================================================== --- head/etc/rc.d/ntpdate Tue Jun 18 02:20:34 2013 (r251884) +++ head/etc/rc.d/ntpdate Tue Jun 18 02:37:15 2013 (r251885) @@ -16,13 +16,13 @@ start_cmd="ntpdate_start" ntpdate_start() { - if [ -z "$ntpdate_hosts" -a -f ${ntpdate_config} ]; then + if [ -z "$ntpdate_hosts" -a -f "$ntpdate_config" ]; then ntpdate_hosts=`awk ' /^server[ \t]*127.127/ {next} /^(server|peer)/ { if ($2 ~/^-/) {print $3} else {print $2}} - ' < ${ntpdate_config}` + ' < "$ntpdate_config"` fi if [ -n "$ntpdate_hosts" -o -n "$rc_flags" ]; then echo "Setting date via ntp."