From owner-svn-src-all@freebsd.org Fri Oct 9 18:47:39 2020 Return-Path: Delivered-To: svn-src-all@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 3F56D428B92 for ; Fri, 9 Oct 2020 18:47:39 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1O1" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4C7HBL45mvz4gsx for ; Fri, 9 Oct 2020 18:47:38 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qk1-x72e.google.com with SMTP id y198so11673254qka.0 for ; Fri, 09 Oct 2020 11:47:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bsdimp-com.20150623.gappssmtp.com; s=20150623; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=rtM+ywnkXWfrOb7ty7VXxqr0q9zt3m2p+Sv8oy4Z/rE=; b=v7ORr8goSEoqzu/AWwgfjbDkPyDCsQ904heLSnp3WnXCWJ/2lP18nj2+E3zLJF40uQ gxmlTkjsWm5GWD50QuusZzjK6PW2zeYnw04VRijIscsv8zVHyRvock1ubySVnx/v/Nfy MMXjznhp4bTWFHRJrDmLMn7gTGnevP3ClxHVT9HwiT0tFuXYCtiAiB/d3gXwYK1JPAT+ bY1bD/X0kEZQ2Q2NMWO7ZZCjnnMHiKxQ8dc7HRyc5NcnfmVCL9h7rR2l2kasArsGEHZr A16beZrkQ5/01ilvDSKx/xTf3dcBVkccQa237HqKPSy4qHKYTvKlbGdyznww0+WeEaP9 88HQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=rtM+ywnkXWfrOb7ty7VXxqr0q9zt3m2p+Sv8oy4Z/rE=; b=i7qBlhHI0kACy+elrnPC5mLTHiZnVHC6POfFgOTHKDBwgMQo/z2Qr7aJNVWvCx8019 Dfu6UiIrBTK388jovAvb+964nA0xJuKAQg4Qc9Y8DNS2c9EItcVNJ/yn6xjqvfwswipG IjDLDXYncBk4rUb5sgPM9sq7ySKSPOHRmN1QKoEaEC1jEYL08nVuZIuOrNt5FWVO8ITK nzjS9tingsyB2E8GP1tAGQw6R7o0tIEGD/frn5YkZ8EgMM4jWiil6pMQDJfr5tz5DKYl +u3NNGLjFI+IeZzyJz4AK77ezDxQfEbrq420oZNlDgS9zQfTplLH91grIQMTiL2CaXc0 Zc5w== X-Gm-Message-State: AOAM530Mo9WZxDUwEzCHSHNxOylzG0RbRlxxv4BVow8GqCetJoUv9m25 LUoHkTy3bdNAmwfyu6ZJMYxOsIBFkA1QxcQXAGcXlQ== X-Google-Smtp-Source: ABdhPJxX/BPn+2ecmijz+aZDrER8TDO2L4ElLnjjJdN6WLASKrgx0A+FavpzmL8nNhXO4fPEMu25+2HPCh2UP0GW460= X-Received: by 2002:ae9:ee06:: with SMTP id i6mr14577167qkg.380.1602269257645; Fri, 09 Oct 2020 11:47:37 -0700 (PDT) MIME-Version: 1.0 References: <202010091529.099FT6Ab049635@repo.freebsd.org> <2f49af1f-f0fb-f5f0-82bf-8b46ead027c1@FreeBSD.org> <563930e3-19ec-44dd-fd6f-1d55859d9235@FreeBSD.org> In-Reply-To: <563930e3-19ec-44dd-fd6f-1d55859d9235@FreeBSD.org> From: Warner Losh Date: Fri, 9 Oct 2020 12:47:25 -0600 Message-ID: Subject: Re: svn commit: r366578 - head/sbin/devd To: Renato Botelho Cc: Warner Losh , src-committers , svn-src-all , svn-src-head X-Rspamd-Queue-Id: 4C7HBL45mvz4gsx X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=v7ORr8go; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::72e) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.95 / 15.00]; RCVD_TLS_ALL(0.00)[]; ARC_NA(0.00)[]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.96)[-0.962]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.99)[-0.987]; MIME_GOOD(-0.10)[multipart/alternative,text/plain]; PREVIOUSLY_DELIVERED(0.00)[svn-src-all@freebsd.org]; DMARC_NA(0.00)[bsdimp.com]; RCPT_COUNT_FIVE(0.00)[5]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[bsdimp-com.20150623.gappssmtp.com:+]; NEURAL_HAM_SHORT(-1.00)[-1.000]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::72e:from]; R_SPF_NA(0.00)[no SPF record]; FORGED_SENDER(0.30)[imp@bsdimp.com,wlosh@bsdimp.com]; MIME_TRACE(0.00)[0:+,1:+,2:~]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; MAILMAN_DEST(0.00)[svn-src-all]; RCVD_COUNT_TWO(0.00)[2] Content-Type: text/plain; charset="UTF-8" X-Content-Filtered-By: Mailman/MimeDel 2.1.33 X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.33 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2020 18:47:39 -0000 On Fri, Oct 9, 2020, 12:20 PM Renato Botelho wrote: > On 09/10/20 15:16, Renato Botelho wrote: > > On 09/10/20 13:57, Warner Losh wrote: > >> > >> > >> On Fri, Oct 9, 2020 at 10:19 AM Renato Botelho >> > wrote: > >> > >> On 09/10/20 12:29, Warner Losh wrote: > >> > Author: imp > >> > Date: Fri Oct 9 15:29:05 2020 > >> > New Revision: 366578 > >> > URL: https://svnweb.freebsd.org/changeset/base/366578 > >> > >> > > >> > Log: > >> > Avoid using single quotes in arguments to logger. > >> > > >> > Single quotes interfere with the workaround put in with > >> r335753 and > >> > aren't necessary in this case. I believe that all the > >> underling issues > >> > with r335753 have been corrected, but need to do more > extensive > >> > followup before reverting it as a bad idea. > >> > >> Hi Warner, > >> > >> How to proceed if it's needed to pass multiple parameters to a > >> command > >> in following format? > >> > >> cmd param1 'param2 has spaces and a $variable' > >> > >> > >> action "cmd param1 'param2 has spaces and a '$variable"; > >> > >> should do the trick. I'm documenting this now... > > > > It worked!! Thanks! > > Oooops, too fast. > > I wrote this script: > > #!/bin/sh > > echo "Param1 = '${1}'" >> /root/log > echo "Param2 = '${2}'" >> /root/log > > And added this action on devd config: > > notify 0 { > match "system" "IFNET"; > match "type" "LINK_UP"; > media-type "ethernet"; > action "/root/log.sh -c 'interface linkup start '$subsystem"; > }; > > notify 0 { > match "system" "IFNET"; > match "type" "LINK_DOWN"; > media-type "ethernet"; > action "/root/log.sh -c 'interface linkup stop '$subsystem"; > }; > > And got the following output on /root/log: > > Param1 = '-c' > Param2 = 'interface linkup start $em0' > Doh. I'll dig deeper. Warner >