From nobody Sun Mar 13 17:58:30 2022 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 2CFCD1A1C715; Sun, 13 Mar 2022 17:58:31 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4KGnTg0J5jz4SyV; Sun, 13 Mar 2022 17:58:31 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647194311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oG0BRsSU3k9LNg0Fd7HUdBEfpkAc1Cy4mFusbcQ8+hE=; b=KA5OXuEhh9ZWOxB9IflnBsCaUTJAXcjRWhthG5VJkRPnNkUJv3me6zqTXQvrSG1sNwi/Z1 aFchQlW5d/kRQBfFWDqSij8UNzU1s2UrLByVP8Sl4SdZ4lcrJTR+Wy71l+UDHwxS4zzQfP doJaYxVKkBPAwArK985HWY2ovNQ7ia4deByszxX+TcuRFimzTVznBRjcxaAnq5lTYxoaV7 +6lGvpI+r3UEIoY+k+AD7mM1fzEmudcOrj2aFlBL2P9yxutIVUFy2I/I1zqEYNiFSrOwuN AvJKQjIeaxEXBIY8JcP/YSqO3IIOZMNEUOFmIEIKthuXWPvQtTOmdEXjjA50QA== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id D69EF1DAEA; Sun, 13 Mar 2022 17:58:30 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 22DHwU9U070852; Sun, 13 Mar 2022 17:58:30 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 22DHwUS3070851; Sun, 13 Mar 2022 17:58:30 GMT (envelope-from git) Date: Sun, 13 Mar 2022 17:58:30 GMT Message-Id: <202203131758.22DHwUS3070851@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Mateusz Piotrowski <0mp@FreeBSD.org> Subject: git: 19a6267d61a0 - main - rc.d/*: Use startmsg instead of echo on start messages List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: 0mp X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 19a6267d61a0c3bd6cd56f19ca3f8a67a54f675c Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1647194311; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oG0BRsSU3k9LNg0Fd7HUdBEfpkAc1Cy4mFusbcQ8+hE=; b=EmEyD5CIkP07rw9lWHrq4QSk0YYx77StABfnTAu2K9GdUMGlJMqC/RD1+0VQgmCp0hJR9I YFb93sRFAPWj/D0ArkFT7R1gOftkYj1MqnApMo0Q4hmkRnBhJYV5uobg/syjPdBqeUClER 6NeCRQJEFjM1PV1CJSJIZ8Km3uGGbOBwWhwOU/T/LfIK05w1HJ9KmoDeAGDJ1EN+gfKGG8 7kbTycKqi53Z60wYYxNcg3wW2J8lCO0KZKfp1v8CuRwX/MuaSH/GclVbCnsTRndDzcAsa7 N+1Cj4oHweMwgeWQtFDhIXKHFpdjJZVmWKFeX9iC70Rn9B3V90jI/pQzz+jk4w== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1647194311; a=rsa-sha256; cv=none; b=IsLJAT3YHq1/4DAjQU7YQq3vr45tZ3/Me/8RanagW29l5c7NtzwRWGaTM8yES0BqOx21ld cNZEyO0POBgUVT7xJpEG/V7cb1vMJLuI0NscaIQswVEzkLiYhk4M4QiJaszhZWm8KL/p6R d5yGiQ0JLGStLUApdCjWQDDmikVVELp5jk4rv2Si6FxtzRXKIOpOVCCh1GDavyIrut6Exy GsbtQoUBPMVqTpJ1isyrMtFLMI8kaQwck0uQxv0SRYwtlt7aeaYrYkFTPC5f6DdLicuzS4 wr8isnX5p77i2agsH6ONrT0s25wyEUNou7yb9z03kobYwWnRAheCIMI2H5ATuA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by 0mp (doc, ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=19a6267d61a0c3bd6cd56f19ca3f8a67a54f675c commit 19a6267d61a0c3bd6cd56f19ca3f8a67a54f675c Author: Jose Luis Duran AuthorDate: 2022-03-13 17:54:39 +0000 Commit: Mateusz Piotrowski <0mp@FreeBSD.org> CommitDate: 2022-03-13 17:57:31 +0000 rc.d/*: Use startmsg instead of echo on start messages By rc.conf(5), setting rc_startmsgs="NO" should silence start messages. Fix a few rc scripts by using startmsg. PR: 255207 Reported by: Jose Luis Duran Reviewed by: imp, 0mp Approved by: imp (src) Differential Revision: https://reviews.freebsd.org/D34514 --- libexec/rc/rc.d/jail | 16 ++++++++-------- libexec/rc/rc.d/local | 4 ++-- libexec/rc/rc.d/netif | 2 +- libexec/rc/rc.d/ppp | 6 +++--- libexec/rc/rc.d/pppoed | 2 +- libexec/rc/rc.d/rfcomm_pppd_server | 6 +++--- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/libexec/rc/rc.d/jail b/libexec/rc/rc.d/jail index 1d544501e32b..d95af40f459e 100755 --- a/libexec/rc/rc.d/jail +++ b/libexec/rc/rc.d/jail @@ -450,7 +450,7 @@ jail_start() if [ $# = 0 ]; then return fi - echo -n 'Starting jails:' + startmsg -n 'Starting jails:' case $1 in _ALL) command=$jail_program @@ -462,14 +462,14 @@ jail_start() _tmp=`mktemp -t jail` || exit 3 if $command $rc_flags $command_args >> $_tmp 2>&1; then $jail_jls jid name | while read _id _name; do - echo -n " $_name" + startmsg -n " $_name" echo $_id > /var/run/jail_${_name}.id done else cat $_tmp fi rm -f $_tmp - echo '.' + startmsg '.' return ;; esac @@ -490,11 +490,11 @@ jail_start() _tmp=`mktemp -t jail_${_j}` || exit 3 if $command $rc_flags $command_args \ >> $_tmp 2>&1 /var/run/jail_${_j}.id else - echo " cannot start jail " \ + startmsg " cannot start jail " \ "\"${_hostname:-${_j}}\": " cat $_tmp fi @@ -517,18 +517,18 @@ jail_start() _tmp=`mktemp -t jail` || exit 3 if $command $rc_flags $command_args \ >> $_tmp 2>&1 /var/run/jail_${_j}.id else - echo " cannot start jail " \ + startmsg " cannot start jail " \ "\"${_hostname:-${_j}}\": " cat $_tmp fi rm -f $_tmp done fi - echo '.' + startmsg '.' } jail_stop() diff --git a/libexec/rc/rc.d/local b/libexec/rc/rc.d/local index ba17a674ae9d..53907ad27011 100755 --- a/libexec/rc/rc.d/local +++ b/libexec/rc/rc.d/local @@ -18,9 +18,9 @@ stop_cmd="local_stop" local_start() { if [ -f /etc/rc.local ]; then - echo -n 'Starting local daemons:' + startmsg -n 'Starting local daemons:' . /etc/rc.local - echo '.' + startmsg '.' fi } diff --git a/libexec/rc/rc.d/netif b/libexec/rc/rc.d/netif index ae30299bfc52..1a2fe0b73589 100755 --- a/libexec/rc/rc.d/netif +++ b/libexec/rc/rc.d/netif @@ -247,7 +247,7 @@ netif_common() _str='Reclaiming' ;; esac - echo "${_str} Network:${_ok}." + startmsg "${_str} Network:${_ok}." case ${_func} in ifn_vnetup) # Clear _ok not to do "ifconfig $ifn" diff --git a/libexec/rc/rc.d/ppp b/libexec/rc/rc.d/ppp index 93d0655b296f..8dbff30a7e32 100755 --- a/libexec/rc/rc.d/ppp +++ b/libexec/rc/rc.d/ppp @@ -82,14 +82,14 @@ ppp_start() _ppp_profile=$ppp_profile fi - echo -n "Starting PPP profile:" + startmsg -n "Starting PPP profile:" for _p in $_ppp_profile; do - echo -n " $_p" + startmsg -n " $_p" ppp_start_profile $_p done - echo "." + startmsg "." } ppp_poststart() diff --git a/libexec/rc/rc.d/pppoed b/libexec/rc/rc.d/pppoed index 7e848595e833..c368b32008a1 100755 --- a/libexec/rc/rc.d/pppoed +++ b/libexec/rc/rc.d/pppoed @@ -24,7 +24,7 @@ pppoed_start() if [ -n "${pppoed_provider}" ]; then pppoed_flags="${pppoed_flags} -p ${pppoed_provider}" fi - echo 'Starting pppoed' + startmsg 'Starting pppoed' _opts=$-; set -f /usr/libexec/pppoed ${pppoed_flags} ${pppoed_interface} set +f; set -${_opts} diff --git a/libexec/rc/rc.d/rfcomm_pppd_server b/libexec/rc/rc.d/rfcomm_pppd_server index 990a22475b0e..a7035f6e4ea7 100755 --- a/libexec/rc/rc.d/rfcomm_pppd_server +++ b/libexec/rc/rc.d/rfcomm_pppd_server @@ -90,14 +90,14 @@ rfcomm_pppd_server_start() _profile=${rfcomm_pppd_server_profile} fi - echo -n "Starting RFCOMM PPP profile:" + startmsg -n "Starting RFCOMM PPP profile:" for _p in ${_profile} ; do - echo -n " ${_p}" + startmsg -n " ${_p}" rfcomm_pppd_server_start_profile ${_p} done - echo "." + startmsg "." } rfcomm_pppd_server_stop()