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 15C98138334 for ; Sun, 21 Apr 2019 05:34:09 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 142B2E0ADC; 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 ED322E0AD3 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 DD93E341BBB for ; Sun, 21 Apr 2019 05:34:05 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 1698D5C0 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: <1555824731.abcc0bd4c372e36cc6e5e46832e7664a72b6bcaa.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: abcc0bd4c372e36cc6e5e46832e7664a72b6bcaa 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: 686370ef-63c3-46c2-b881-f5913ef9ce3c X-Archives-Hash: db6e040fcbf969007a4e17c8d0ac5b96 commit: abcc0bd4c372e36cc6e5e46832e7664a72b6bcaa Author: Robin H. Johnson gentoo org> AuthorDate: Sun Apr 21 05:22:09 2019 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Sun Apr 21 05:32:11 2019 +0000 URL: https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=abcc0bd4 init.d/net.lo.in: shellcheck: depend() Signed-off-by: Robin H. Johnson gentoo.org> init.d/net.lo.in | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/init.d/net.lo.in b/init.d/net.lo.in index 6d6b581..e49278f 100644 --- a/init.d/net.lo.in +++ b/init.d/net.lo.in @@ -34,10 +34,11 @@ MODULESLIST="${RC_SVCDIR}/nettree$(get_interface)" depend() { - local IFACE=$(get_interface) - local IFVAR=$(shell_var "${IFACE}") + local IFACE IFVAR + IFACE=$(get_interface) + IFVAR=$(shell_var "${IFACE}") - if [ "$RC_UNAME" = Linux -a "$IFACE" != lo ]; then + if [ "$RC_UNAME" = Linux ] && [ "$IFACE" != lo ]; then need sysfs after modules fi @@ -54,14 +55,14 @@ depend() esac if [ "$(command -v "depend_${IFVAR}")" = "depend_${IFVAR}" ]; then - depend_${IFVAR} + "depend_${IFVAR}" fi - local dep= prov= + local dep prov for dep in need use before after provide keyword; do eval prov=\$rc_${dep}_${IFVAR} if [ -n "${prov}" ]; then - ${dep} ${prov} + "${dep}" "${prov}" ewarn "rc_${dep}_${IFVAR} is deprecated." ewarn "Please use rc_net_${IFVAR}_${dep} instead." fi