From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 8237A138334 for ; Sun, 21 Apr 2019 05:34:07 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6B491E0ACB; Sun, 21 Apr 2019 05:34:06 +0000 (UTC) Received: from smtp.gentoo.org (mail.gentoo.org [IPv6:2001:470:ea4a:1:5054:ff:fec7:86e4]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 3E76CE0ACB for ; Sun, 21 Apr 2019 05:34:06 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 40C40341BBE for ; Sun, 21 Apr 2019 05:34:04 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id E1B265BE for ; Sun, 21 Apr 2019 05:34:02 +0000 (UTC) From: "Robin H. Johnson" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Robin H. Johnson" Message-ID: <1555824666.d2d52cd821372c65b92d262da66a30794735204c.robbat2@OpenRC> Subject: [gentoo-commits] proj/netifrc:master commit in: init.d/ X-VCS-Repository: proj/netifrc X-VCS-Files: init.d/net.lo.in X-VCS-Directories: init.d/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: d2d52cd821372c65b92d262da66a30794735204c X-VCS-Branch: master Date: Sun, 21 Apr 2019 05:34:02 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 008b006d-a0d0-4684-96d9-5963035932e0 X-Archives-Hash: 5f1ce7aa906a835b9eb143537df4851f commit: d2d52cd821372c65b92d262da66a30794735204c Author: Robin H. Johnson gentoo org> AuthorDate: Sun Apr 21 05:21:51 2019 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Sun Apr 21 05:31:06 2019 +0000 URL: https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=d2d52cd8 init.d/net.lo.in: shellcheck: disable some false positives Signed-off-by: Robin H. Johnson gentoo.org> init.d/net.lo.in | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/init.d/net.lo.in b/init.d/net.lo.in index d9a4d24..1e5de3c 100644 --- a/init.d/net.lo.in +++ b/init.d/net.lo.in @@ -83,6 +83,7 @@ _get_array() { local _a= if [ -n "${BASH}" ]; then + # shellcheck disable=SC2039 case "$(declare -p "$1" 2>/dev/null)" in "declare -a "*) ewarn "You are using a bash array for $1." @@ -104,6 +105,7 @@ _get_array() _flatten_array() { if [ -n "${BASH}" ]; then + # shellcheck disable=SC2039 case "$(declare -p "$1" 2>/dev/null)" in "declare -a "*) ewarn "You are using a bash array for $1." @@ -111,6 +113,7 @@ _flatten_array() ewarn "Please see net.example for the correct format for $1." eval "set -- \"\${$1[@]}\"" for x; do + # shellcheck disable=SC2059 printf "'%s' " "$(printf "$x" | sed "s:':'\\\'':g")" done return 0 @@ -194,6 +197,7 @@ _netmask2cidr() quad=${quad}${quad:+.}0x${hex%${lastbut2}*} hex=${lastbut2} done + # shellcheck disable=SC2086 set -- ${quad} ;; esac @@ -427,6 +431,7 @@ _load_modules() MODULES= if [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ]; then eval mymods=\$modules_${IFVAR} + # shellcheck disable=SC2154 [ -z "${mymods}" ] && mymods=${modules} fi @@ -627,6 +632,7 @@ start() local IFVAR=$(shell_var "${IFACE}") cmd= our_metric= local metric=0 _up_before_preup eval _up_before_preup="\$up_before_preup_${IFVAR}" + # shellcheck disable=SC2154 [ -z "${_up_before_preup}" ] && _up_before_preup=$up_before_preup einfo "Bringing up interface ${IFACE}"