From owner-freebsd-stable@FreeBSD.ORG Fri Jun 15 22:29:47 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 C27E81065677 for ; Fri, 15 Jun 2012 22:29:47 +0000 (UTC) (envelope-from wblock@wonkity.com) Received: from wonkity.com (wonkity.com [67.158.26.137]) by mx1.freebsd.org (Postfix) with ESMTP id 61C718FC0C for ; Fri, 15 Jun 2012 22:29:47 +0000 (UTC) Received: from wonkity.com (localhost [127.0.0.1]) by wonkity.com (8.14.5/8.14.5) with ESMTP id q5FMTjQe028707; Fri, 15 Jun 2012 16:29:45 -0600 (MDT) (envelope-from wblock@wonkity.com) Received: from localhost (wblock@localhost) by wonkity.com (8.14.5/8.14.5/Submit) with ESMTP id q5FMTjeq028704; Fri, 15 Jun 2012 16:29:45 -0600 (MDT) (envelope-from wblock@wonkity.com) Date: Fri, 15 Jun 2012 16:29:45 -0600 (MDT) From: Warren Block To: Freddie Cash In-Reply-To: Message-ID: References: <8F30E6C0-0FDB-46D2-9E2F-3A909B8B6182@mac.com> <201206151845.q5FIjBht085039@lurza.secnetix.de> User-Agent: Alpine 2.00 (BSF 1167 2008-08-23) MIME-Version: 1.0 Content-Type: MULTIPART/MIXED; BOUNDARY="-902635197-1951629115-1339799385=:28641" X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.2.7 (wonkity.com [127.0.0.1]); Fri, 15 Jun 2012 16:29:45 -0600 (MDT) Cc: freebsd-stable@freebsd.org, Oliver Fromme 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 22:29:47 -0000 This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. ---902635197-1951629115-1339799385=:28641 Content-Type: TEXT/PLAIN; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8BIT On Fri, 15 Jun 2012, Freddie Cash wrote: > On Fri, Jun 15, 2012 at 11:45 AM, Oliver Fromme wrote: >> Chuck Swiger wrote: >>  > On Jun 15, 2012, at 11:23 AM, Oliver Fromme wrote: >>  > > You can try to prepend a backslash, i.e. echo \$devnum.  This >>  > > isn't documented, but then again, using backslashes to continue >>  > > strings that span multiple lines isn't documented either. >>  > >>  > 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? It can be done that way, sure. But allowing short scripts in the action string makes for less files to maintain. Exactly how devd parses the action string should be better-defined either way. ---902635197-1951629115-1339799385=:28641--