Date: Fri, 15 Jun 2012 11:53:43 -0700 From: Freddie Cash <fjwcash@gmail.com> To: Oliver Fromme <olli@lurza.secnetix.de> Cc: freebsd-stable@freebsd.org Subject: Re: devd problem with 9-stable Message-ID: <CAOjFWZ72qWKFPr81VbDZjyNaeaD5-7_DUYtn4hQ1qceiXVdTZg@mail.gmail.com> In-Reply-To: <201206151845.q5FIjBht085039@lurza.secnetix.de> References: <8F30E6C0-0FDB-46D2-9E2F-3A909B8B6182@mac.com> <201206151845.q5FIjBht085039@lurza.secnetix.de>
next in thread | previous in thread | raw e-mail | index | archive | help
On Fri, Jun 15, 2012 at 11:45 AM, Oliver Fromme <olli@lurza.secnetix.de> wr= ote: > Chuck Swiger wrote: > =C2=A0> On Jun 15, 2012, at 11:23 AM, Oliver Fromme wrote: > =C2=A0> > You can try to prepend a backslash, i.e. echo \$devnum. =C2=A0T= his > =C2=A0> > isn't documented, but then again, using backslashes to continue > =C2=A0> > strings that span multiple lines isn't documented either. > =C2=A0> > =C2=A0> Line continuations and escaping special chars like $ are in "man = sh": > > Yes, I know that, but the question is how devd(8) parses the > action strings. > > The problem here is that we have multiple levels or parsing. > First, devd reads the line, concatenates continuation lines > (apparently -- it's not documented), expands devd variables, > and *then* it passes the resulting string to the shell for > further parsing and processing. If you have that many levels of backticks, variable expansions, programs, etc, wouldn't it be a prime candidate for a script? Just pass in a couple of variables directly from devd, and then do everything else inside the script? --=20 Freddie Cash fjwcash@gmail.com
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CAOjFWZ72qWKFPr81VbDZjyNaeaD5-7_DUYtn4hQ1qceiXVdTZg>