From owner-freebsd-stable@FreeBSD.ORG Fri Jun 15 18:53:43 2012 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id C98BF106564A for ; Fri, 15 Jun 2012 18:53:43 +0000 (UTC) (envelope-from fjwcash@gmail.com) Received: from mail-pz0-f54.google.com (mail-pz0-f54.google.com [209.85.210.54]) by mx1.freebsd.org (Postfix) with ESMTP id 9CDDC8FC12 for ; Fri, 15 Jun 2012 18:53:43 +0000 (UTC) Received: by dadv36 with SMTP id v36so4655697dad.13 for ; Fri, 15 Jun 2012 11:53:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; bh=zhRBD8ENbKvn9FEPn30GPjXeYl3XF1A7wjThm6L8QoI=; b=HKhVWcsz/RIr+vPO/bJFIogQuTgKyVHh+Te82OWkd4yskAyRGVS3wRfaVH+nVNhOdQ W4szu+DCpGu2LMtLRoj9Ms+3s03PgnDqBOlgxJTe87MFWu5/dk4lTjojMbfcTuQ43ksr 3cxVWIWfcZnI6ylbwPhB2xmNl1csLa5FiPnv0XqY+0eE/TjuPHgHoljpHNdzwhZ/r0wb xpHVVKgpA3n6y8RfF+PDF5DX+/CadZHWNaroQeGV7/qw6R9RX+4YcegFckDHlKJN6boc ld5RqZDaVlOGQDideyrCIasWT36ZRUY0xJOyIF8P6n/R7bujPsUkENGGzZzieplhSX5r vPPw== MIME-Version: 1.0 Received: by 10.68.222.103 with SMTP id ql7mr22627339pbc.68.1339786423173; Fri, 15 Jun 2012 11:53:43 -0700 (PDT) Received: by 10.68.241.65 with HTTP; Fri, 15 Jun 2012 11:53:43 -0700 (PDT) In-Reply-To: <201206151845.q5FIjBht085039@lurza.secnetix.de> References: <8F30E6C0-0FDB-46D2-9E2F-3A909B8B6182@mac.com> <201206151845.q5FIjBht085039@lurza.secnetix.de> Date: Fri, 15 Jun 2012 11:53:43 -0700 Message-ID: From: Freddie Cash To: Oliver Fromme Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Cc: freebsd-stable@freebsd.org Subject: Re: devd problem with 9-stable X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 15 Jun 2012 18:53:43 -0000 On Fri, Jun 15, 2012 at 11:45 AM, Oliver Fromme 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