From owner-freebsd-questions Wed Jan 13 22:04:04 1999 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA22949 for freebsd-questions-outgoing; Wed, 13 Jan 1999 22:04:04 -0800 (PST) (envelope-from owner-freebsd-questions@FreeBSD.ORG) Received: from oolong.camellia.org (oolong.camellia.org [206.119.96.100]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id WAA22941 for ; Wed, 13 Jan 1999 22:04:01 -0800 (PST) (envelope-from alan@oolong.camellia.org) Received: (from alan@localhost) by oolong.camellia.org (8.8.8/8.8.8+Erasmus) id BAA06855; Thu, 14 Jan 1999 01:02:50 -0500 (EST) (envelope-from alan) Date: Thu, 14 Jan 1999 01:02:50 -0500 (EST) References: <8Jan1999.042549.Alan@LCS.MIT.EDU> <19990108192746.B63511@scientia.demon.co.uk> <9Jan1999.220116.Alan@LCS.MIT.EDU> <19990110041754.A94335@scientia.demon.co.uk> Message-Id: <14Jan1999.003932.Alan@LCS.MIT.EDU> From: Alan Bawden To: freebsd-questions@FreeBSD.ORG In-reply-to: <19990110041754.A94335@scientia.demon.co.uk> (message from Ben Smithurst on Sun, 10 Jan 1999 04:17:54 +0000) Subject: Re: messing with /etc/rc.conf Sender: owner-freebsd-questions@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Date: Sun, 10 Jan 1999 04:17:54 +0000 From: Ben Smithurst Cc: freebsd-questions@FreeBSD.ORG Content-Type: text/plain; charset=us-ascii Alan Bawden wrote: > > something will occasionally re-write this to read: > > > > ntpdate_flags="-bs $(awk '$1 == " ... I'm not aware of any other program which parses it. ... 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. So perhaps someone -else- would care to answer my question? 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 == " This led me to take the admonition at the front of the rc.conf file ("All arguments must be in double or single quotes") more seriously than I had previously. I started to wonder just what were the intended rules for what could, and could not safely be written in this file. For example, were lines like: foo="baz ${mumble} bar" safe? If I moved my definition of ntpdate_flags into rc.conf.local, would it be safe there? If I knew what tools it were that messed with rc.conf, perhaps I could protect myself. Somebody? To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message