From owner-svn-src-all@freebsd.org Fri Oct 9 18:20:51 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 E905D4282CC; Fri, 9 Oct 2020 18:20:51 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: from mail-qk1-x736.google.com (mail-qk1-x736.google.com [IPv6:2607:f8b0:4864:20::736]) (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 4C7GbR2Q2fz4fyb; Fri, 9 Oct 2020 18:20:50 +0000 (UTC) (envelope-from garga.bsd@gmail.com) Received: by mail-qk1-x736.google.com with SMTP id v123so11529871qkd.9; Fri, 09 Oct 2020 11:20:50 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:subject:from:to:cc:references:message-id:date:user-agent :mime-version:in-reply-to:content-language:content-transfer-encoding; bh=8zdOJNgO7FqDolUaVZ3t7pdohdNRne2h8mcl06Luck8=; b=gCSZD0w8UifIvA1+X6tTscThFMKavHO16Vucy4fm2UlhNprx5gGY2AOdjhD8N+1/LN M5eVmAy9RGFNGO2kcx4j9XDNHGH4ycDaN6HggG/wszbah7OgpQy2l3n1ha5pUyUqhq2o YmWHwGikH5WxWTbwdBAUiC3okqTCWU/6U9LbTlbUDiPFpVqJRxHcUZC+E1b1849Stnuq rzTpibBpXV7SGvnan+Cwodh+e6oqcZoopp3FjZJ39cotoHvxuN2BPf4NjfUHwPMiu1l0 DXKwbvlWmIw5P5Vb/RJWPjLsXR/CIZHBNCr4nv0prD7m6EmyqFOVtxjalmI7PvdcDnkJ tepg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:subject:from:to:cc:references:message-id :date:user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=8zdOJNgO7FqDolUaVZ3t7pdohdNRne2h8mcl06Luck8=; b=hSCyXwJTMgB917UAh6nfQCZU9X1fv7jZPs3XISEQFI5Lfsx20Ded3vI78v30DcPhVm 462bZettG/3RdP5RfbH8CoyJ8uR7zp7FU66PNxvii6NSIzlaFfsm5oJ7wfKhPlGcGyvF 9ExV4Mvc9q99UK/yVrJqXUyldlq7qv7coqedYLU1Y2c7M9rbHd1WutNKCks0eOJGfBFV G1NpEOWjdsSm2y48QoLgt5PAW1jdmHHdR6GfYFL+gfZMIYPUOruca28BOXHm7yeCs2Py eQXivV2WKz5EQnO+c8zkfXPn61P50yxxkDpdXFfa1Dyqc/2wvCsseLOwvfJ/e20O+V+B WQ7A== X-Gm-Message-State: AOAM533c9c+yYraHOZ1GGt/Ob4i30sc/izaOcvUnwSbyqVThTn8X03if Qb2aK/sVYr2LUG65ZvxubRevZiEvcFM= X-Google-Smtp-Source: ABdhPJxTA69ntoKKbIZVkOVsTj1XYni2528uoEoOsEx2p30LL47/ve8ToWeuyyTVPy3m+cEokXTatw== X-Received: by 2002:a05:620a:142e:: with SMTP id k14mr9531795qkj.483.1602267650125; Fri, 09 Oct 2020 11:20:50 -0700 (PDT) Received: from mbp.home (200-12-5-188.rev.tribenet.com.br. [200.12.5.188]) by smtp.gmail.com with ESMTPSA id i19sm6426858qti.71.2020.10.09.11.20.47 (version=TLS1_3 cipher=TLS_AES_128_GCM_SHA256 bits=128/128); Fri, 09 Oct 2020 11:20:49 -0700 (PDT) Sender: Renato Botelho Subject: Re: svn commit: r366578 - head/sbin/devd From: Renato Botelho To: Warner Losh Cc: Warner Losh , src-committers , svn-src-all , svn-src-head References: <202010091529.099FT6Ab049635@repo.freebsd.org> <2f49af1f-f0fb-f5f0-82bf-8b46ead027c1@FreeBSD.org> Message-ID: <563930e3-19ec-44dd-fd6f-1d55859d9235@FreeBSD.org> Date: Fri, 9 Oct 2020 15:20:46 -0300 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:78.0) Gecko/20100101 Thunderbird/78.3.2 MIME-Version: 1.0 In-Reply-To: <2f49af1f-f0fb-f5f0-82bf-8b46ead027c1@FreeBSD.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 8bit X-Rspamd-Queue-Id: 4C7GbR2Q2fz4fyb X-Spamd-Bar: --- Authentication-Results: mx1.freebsd.org; dkim=pass header.d=gmail.com header.s=20161025 header.b=gCSZD0w8; dmarc=none; spf=pass (mx1.freebsd.org: domain of gargabsd@gmail.com designates 2607:f8b0:4864:20::736 as permitted sender) smtp.mailfrom=gargabsd@gmail.com X-Spamd-Result: default: False [-3.28 / 15.00]; ARC_NA(0.00)[]; RCVD_VIA_SMTP_AUTH(0.00)[]; R_DKIM_ALLOW(-0.20)[gmail.com:s=20161025]; RCVD_TLS_ALL(0.00)[]; FROM_HAS_DN(0.00)[]; R_SPF_ALLOW(-0.20)[+ip6:2607:f8b0:4000::/36:c]; MID_RHS_MATCH_FROM(0.00)[]; MIME_GOOD(-0.10)[text/plain]; DMARC_NA(0.00)[FreeBSD.org]; NEURAL_HAM_LONG(-1.00)[-1.004]; RCPT_COUNT_FIVE(0.00)[5]; RCVD_COUNT_THREE(0.00)[3]; TO_MATCH_ENVRCPT_SOME(0.00)[]; TO_DN_ALL(0.00)[]; DKIM_TRACE(0.00)[gmail.com:+]; NEURAL_HAM_SHORT(-1.06)[-1.058]; RCVD_IN_DNSWL_NONE(0.00)[2607:f8b0:4864:20::736:from]; NEURAL_HAM_MEDIUM(-1.02)[-1.017]; FORGED_SENDER(0.30)[garga@FreeBSD.org,gargabsd@gmail.com]; MIME_TRACE(0.00)[0:+]; FREEMAIL_ENVFROM(0.00)[gmail.com]; ASN(0.00)[asn:15169, ipnet:2607:f8b0::/32, country:US]; TAGGED_FROM(0.00)[]; FROM_NEQ_ENVFROM(0.00)[garga@FreeBSD.org,gargabsd@gmail.com]; MAILMAN_DEST(0.00)[svn-src-head,svn-src-all] 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:20:52 -0000 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'