From owner-svn-src-all@freebsd.org Fri Oct 9 20:13:21 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 1D86742BF8C for ; Fri, 9 Oct 2020 20:13:21 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: from mail-qv1-xf2d.google.com (mail-qv1-xf2d.google.com [IPv6:2607:f8b0:4864:20::f2d]) (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 4C7K5D0bNYz4q2c for ; Fri, 9 Oct 2020 20:13:19 +0000 (UTC) (envelope-from wlosh@bsdimp.com) Received: by mail-qv1-xf2d.google.com with SMTP id j3so5355388qvi.7 for ; Fri, 09 Oct 2020 13:13:19 -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=E4DvHZfegp7U1G8Cos7RjkcaKeraE3GXOQH80Do5jIA=; b=YDenw7cpv2a5vAxIMUyC7AzyhTZyX6jD9W1Oitbd1ocM+DXIb/+1/aMaK52gf0AQrX pGnSG3Jcyrp8I+F8UOjVirJ4D0VO+EwzjDo2b2RjyoViG8hLr/IJgiWV3FWYV9/zXwEc NeW97b+rIYLh4gWsdsaKalRZkpdP7ARgWMv4ao3hUQmBSlcViqFwuVM81W5sWWoQK4+W wAe8vlEO/8Lq2M2HvbuS0mOwx9PvjZnLr0Mz99pjKIxm00KqnxzCuyThNzYyOleRntjw VHxqWHIpA5s2ZGAJ6wEeZhx10EF4ssmdXDue2YXtsDDL6azeLl+xCKH803aeZ6JAcxDk 6+/g== 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=E4DvHZfegp7U1G8Cos7RjkcaKeraE3GXOQH80Do5jIA=; b=Ip1NqTkcwUgd5bEEGfe6sRjLfq8ttdmyUsQ3HkfW6EiUAmEc+MF9c1eRojippcgrzf rWWRi1TqC/R1Sg6T+NwGeCnPTU/wW0NW5pH/4VJAsXvdu4noDcMp0T5MU83GPI65CepJ bJd8LY6BzFbWITJ3ECiuxOhCDGoy1uTveWv5Ws0M9qkd+qhvLj8UwYhcvSb6I5z58DKx 4CCH2bMqRF17Se6rMR1kcznUU5jIXfbsg+2Dm4A8bZ8Kr8qesmJ7Te4a1T7C3FYFzv2J MTs8Zlib1Y6nJs3vcNZK2zrGscXhyKPVFohfxxhdG3tCZcfzcyxXiBuAHm4+5s6da4/I r9yQ== X-Gm-Message-State: AOAM531OkKzLTuJ2v+us7chuUu6A72+KjXWgiCd0rrxjL5Y5ee5JWEd+ q65M8XkSdV/oqCleCjiwwla1h+E0VYEbmNNQR2f5+Q== X-Google-Smtp-Source: ABdhPJwh+gi0Zw9hEH4A3yuaDL+3EJgHSeZobwUl+Ymd0KG9chWiIyVCuomHiIyxIZFcSV+GSUl43CT8e4dKh5UcpKc= X-Received: by 2002:a05:6214:174f:: with SMTP id dc15mr14059435qvb.26.1602274399025; Fri, 09 Oct 2020 13:13:19 -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: From: Warner Losh Date: Fri, 9 Oct 2020 14:13:08 -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: 4C7K5D0bNYz4q2c X-Spamd-Bar: -- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=bsdimp-com.20150623.gappssmtp.com header.s=20150623 header.b=YDenw7cp; dmarc=none; spf=none (mx1.freebsd.org: domain of wlosh@bsdimp.com has no SPF policy when checking 2607:f8b0:4864:20::f2d) smtp.mailfrom=wlosh@bsdimp.com X-Spamd-Result: default: False [-2.65 / 15.00]; ARC_NA(0.00)[]; MAILMAN_DEST(0.00)[svn-src-all]; R_DKIM_ALLOW(-0.20)[bsdimp-com.20150623.gappssmtp.com:s=20150623]; NEURAL_HAM_MEDIUM(-0.95)[-0.954]; FROM_HAS_DN(0.00)[]; NEURAL_HAM_LONG(-0.98)[-0.979]; 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(-0.72)[-0.716]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::f2d: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]; RCVD_TLS_ALL(0.00)[]; FROM_NEQ_ENVFROM(0.00)[imp@bsdimp.com,wlosh@bsdimp.com]; 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 20:13:21 -0000 On Fri, Oct 9, 2020 at 12:47 PM Warner Losh wrote: > > > 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. > It works for me. Did you remember to kill -HUP devd? Warner