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.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 9F238158020 for ; Sun, 25 Dec 2022 19:14:35 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id DE370E086F; Sun, 25 Dec 2022 19:14:34 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id BF303E086F for ; Sun, 25 Dec 2022 19:14:34 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id B286B34100A for ; Sun, 25 Dec 2022 19:14:33 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id EE8A76F2 for ; Sun, 25 Dec 2022 19:14:31 +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: <1671995644.d877a5aa5b105b17ced7be467fb4412a9ddd05aa.robbat2@OpenRC> Subject: [gentoo-commits] proj/netifrc:master commit in: net/ X-VCS-Repository: proj/netifrc X-VCS-Files: net/hsr.sh X-VCS-Directories: net/ X-VCS-Committer: robbat2 X-VCS-Committer-Name: Robin H. Johnson X-VCS-Revision: d877a5aa5b105b17ced7be467fb4412a9ddd05aa X-VCS-Branch: master Date: Sun, 25 Dec 2022 19:14:31 +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: c4be18dd-16f6-4330-b146-319766a37967 X-Archives-Hash: b1dbfe7f6df8bf0f656dfe66df17cd68 commit: d877a5aa5b105b17ced7be467fb4412a9ddd05aa Author: Robin H. Johnson gentoo org> AuthorDate: Sun Dec 25 19:14:04 2022 +0000 Commit: Robin H. Johnson gentoo org> CommitDate: Sun Dec 25 19:14:04 2022 +0000 URL: https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=d877a5aa net/hsr: add Parallel Redundancy Protocol (PRP) support Signed-off-by: Robin H. Johnson gentoo.org> Reference: https://github.com/gentoo/netifrc/pull/38 net/hsr.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/net/hsr.sh b/net/hsr.sh index f5a427f..cbe35e9 100644 --- a/net/hsr.sh +++ b/net/hsr.sh @@ -21,6 +21,8 @@ hsr_pre_start() eval hsr_slave1=\$hsr_slave1_${IFVAR} eval hsr_slave2=\$hsr_slave2_${IFVAR} eval hsr_supervision=\$hsr_supervision_${IFVAR} + eval hsr_version=\$hsr_version_${IFVAR} + eval hsr_proto=\$hsr_proto_${IFVAR} if [ -z "${hsr_slave1}" ] || [ -z "${hsr_slave2}" ]; then eerror "HSR interfaces require two slave interfaces to be set" return 1 @@ -35,7 +37,10 @@ hsr_pre_start() fi ebegin "Creating HSR interface ${IFACE}" - cmd="ip link add name "${IFACE}" type hsr slave1 ${hsr_slave1} slave2 ${hsr_slave2} ${hsr_supervision:+supervision }${hsr_supervision}" + cmd="ip link add name "${IFACE}" type hsr slave1 ${hsr_slave1} slave2 ${hsr_slave2}" + test -n "${hsr_supervision}" && cmd="${cmd} supervision ${hsr_supervision}" + test -n "${hsr_version}" && cmd="${cmd} version ${hsr_version}" + test -n "${hsr_proto}" && cmd="${cmd} proto ${hsr_proto}" veinfo $cmd if $cmd ; then eend 0 && _up && set_interface_type hsr