From owner-freebsd-questions Thu Jan 14 01:11:50 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id BAA11612 for freebsd-questions-outgoing; Thu, 14 Jan 1999 01:11:50 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from fir.calcasieu.com (fir.calcasieu.com [209.99.46.67]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id BAA11603 for ; Thu, 14 Jan 1999 01:11:47 -0800 (PST) (envelope-from sysop@austin.calcasieu.com) Received: from oak.austin.calcasieu.com (oak.austin.calcasieu.com [192.168.170.7]) by fir.calcasieu.com (8.8.8/8.8.8-2.0) with SMTP id DAA27544; Thu, 14 Jan 1999 03:10:38 -0600 (CST) Received: by oak.austin.calcasieu.com id AA29065 for freebsd-questions@freebsd.org; Thu, 14 Jan 1999 03:10:35 -0600 From: Don Read Message-Id: <9901140910.AA29065@oak.austin.calcasieu.com> Subject: Re: messing with /etc/rc.conf To: Alan@lcs.mit.edu (Alan Bawden) Date: Thu, 14 Jan 1999 03:10:35 -0600 (CST) Cc: freebsd-questions@FreeBSD.ORG In-Reply-To: <14Jan1999.003932.Alan@LCS.MIT.EDU> from "Alan Bawden" at Jan 14, 99 01:02:50 am X-Mailer: ELM [version 2.4 PL25] Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG > > OK, so I've now established that the first guy to try answering my question > didn't actually know that something other than `sh' occasionally reads and > re-writes the contents of /etc/rc.conf. > 'tude--; > > To review: I recently noticed that the line in my rc.conf file that used to > read: > > ntpdate_flags="-bs $(/usr/bin/awk '$1 == "server" || $1 == "peer" {print $2}' /etc/ntp.conf)" > > had been altered to read: > > ntpdate_flags="-bs $(/usr/bin/awk '$1 == " > The problem is the use of mixed quote-ing [" '] attempting to run a process instead of the expected constant " ". try instead: ntpdate_flags=`echo \-bs;awk '/^server|^peer/{ print $2 }' /etc/ntp.conf` (works from cmd line, YMMV). > > Somebody? > who ? me ? Regards, -- Don Read sysop@calcasieu.com EDP Manager dread@texas.net Calcasieu Lumber Co. Austin TX -- Will sysadmin for food To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message