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 DFFC8138334 for ; Sun, 21 Apr 2019 05:34:11 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 360EDE0AD4; Sun, 21 Apr 2019 05:34:07 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (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 1CB89E0AD4 for ; Sun, 21 Apr 2019 05:34:07 +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 0973A341BC4 for ; Sun, 21 Apr 2019 05:34:06 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 9265A5CA for ; Sun, 21 Apr 2019 05:34:03 +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: <1555824815.c78662eeafaf5f9254f62ae1f40f7c058180af8a.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: c78662eeafaf5f9254f62ae1f40f7c058180af8a X-VCS-Branch: master Date: Sun, 21 Apr 2019 05:34:03 +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: d179526a-873f-4b87-9a7f-8991b2c18f49 X-Archives-Hash: bdba569c7e3ea256593daffcd86b8aec commit: c78662eeafaf5f9254f62ae1f40f7c058180af8a Author: Robin H. Johnson gentoo org> AuthorDate: Sun Apr 21 05:24:46 2019 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Sun Apr 21 05:33:35 2019 +0000 URL: https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=c78662ee init.d/net.lo.in: shellcheck: _load_modules Signed-off-by: Robin H. Johnson gentoo.org> init.d/net.lo.in | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/init.d/net.lo.in b/init.d/net.lo.in index a958598..c8af39f 100644 --- a/init.d/net.lo.in +++ b/init.d/net.lo.in @@ -430,13 +430,13 @@ _load_modules() fi MODULES= - if [ "${IFACE}" != "lo" -a "${IFACE}" != "lo0" ]; then + if [ "${IFACE}" != "lo" ] && [ "${IFACE}" != "lo0" ]; then eval mymods=\$modules_${IFVAR} # shellcheck disable=SC2154 [ -z "${mymods}" ] && mymods=${modules} fi - local i=-1 x= mod= f= provides= + local i=-1 x='' mod='' f='' provides='' while true; do : $(( i += 1 )) eval mod=\$module_${i} @@ -446,7 +446,7 @@ _load_modules() eval set -- \$module_${i}_program if [ -n "$1" ]; then if ! _program_available "$@" >/dev/null; then - vewarn "Skipping module $mod due to missing program: $@" + vewarn "Skipping module $mod due to missing program: $*" continue fi fi @@ -457,7 +457,7 @@ _load_modules() fi if [ -n "$1" ]; then if ! _program_available "$@" >/dev/null; then - vewarn "Skipping module $mod due to missing program: $@" + vewarn "Skipping module $mod due to missing program: $*" continue fi fi @@ -483,7 +483,8 @@ _load_modules() # Wrap our provides local f= for f in pre_start start post_start; do - eval "${provides}_${f}() { [ "$(command -v "${mod}_${f}")" = "${mod}_${f}" ] || return 0; ${mod}_${f} \"\$@\"; }" + inner=$(command -v "${mod}_${f}") + eval "${provides}_${f}() { [ '${inner}' = '${mod}_${f}' ] || return 0; ${mod}_${f} \"\$@\"; }" done eval module_${mod}_provides="${provides}" @@ -497,7 +498,8 @@ _load_modules() eval x=\$module_${mod}_provides [ -z "${x}" ] && continue for f in pre_start start post_start; do - eval "${x}_${f}() { [ "$(command -v "${mod}_${f}")" = "${mod}_${f}" ] || return 0; ${mod}_${f} \"\$@\"; }" + inner=$(command -v "${mod}_${f}") + eval "${x}_${f}() { [ '${inner}' = '${mod}_${f}' ] || return 0; ${mod}_${f} \"\$@\"; }" done eval module_${x}_providedby="${mod}" ;;