Date: Sun, 10 Jan 1999 04:17:54 +0000 From: Ben Smithurst <ben@scientia.demon.co.uk> To: Alan Bawden <Alan@LCS.MIT.EDU> Cc: freebsd-questions@FreeBSD.ORG Subject: Re: messing with /etc/rc.conf Message-ID: <19990110041754.A94335@scientia.demon.co.uk> In-Reply-To: <9Jan1999.220116.Alan@LCS.MIT.EDU> References: <8Jan1999.042549.Alan@LCS.MIT.EDU> <19990108192746.B63511@scientia.demon.co.uk> <9Jan1999.220116.Alan@LCS.MIT.EDU>
next in thread | previous in thread | raw e-mail | index | archive | help
Alan Bawden wrote: > > something will occasionally re-write this to read: > > > > ntpdate_flags="-bs $(awk '$1 == " How do you mean, "occasionally"? Occasionally during boot up, or some other time? It should never happen at bootup, since sh is only doing it, as far as I know, and I'm not aware of any other programs which parse it at other times. > That second doublequote is -inside- a $( ) pair, and so does -not- > terminate the string if `sh' is doing the parsing. um. oops. I see what you mean, I was thinking the $() would get parsed later on, for some reason, and so wouldn't be noticed at this point. Even if it did, a line like variable="foo"bar"more foo" would be just as legal, so I've got no excuse for that slip :-( > I was wondering what -other- program it is that parses /etc/rc.conf, and if > there was some way I could write something that makes -both- sh, and that > other mystery program happy at the same time. I'm not aware of any other program which parses it. Perhaps if you put that awk one-liner into a separate file and make awk run that, the problem would be solved, since the quotes would go. That seems like overkill though. It can't hurt to try putting it in rc.conf.local, like you suggest. Also, have you tried putting the main closing quote before the $(, like ntpdate_flags="-bs "$(awk 'stuff') I tried that, and it works perfectly well in sh, you could see if this mystery other program is just as happy (I doubt it would, it would probably still terminate it on the first quote). -- Ben Smithurst ben@scientia.demon.co.uk send a blank message to ben+pgp@scientia.demon.co.uk for PGP key To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-questions" in the body of the message
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?19990110041754.A94335>