From: "Robin H. Johnson" <robbat2@gentoo.org>
To: gentoo-commits@lists.gentoo.org
Subject: [gentoo-commits] proj/netifrc:master commit in: net/, doc/
Date: Sun, 8 Nov 2015 14:30:01 +0000 (UTC) [thread overview]
Message-ID: <1446927482.734e527dbe32fc3c0abdd326c485a6e69d8646f2.robbat2@OpenRC> (raw)
commit: 734e527dbe32fc3c0abdd326c485a6e69d8646f2
Author: Alon Bar-Lev <alonbl <AT> gentoo <DOT> org>
AuthorDate: Sat Nov 7 20:02:59 2015 +0000
Commit: Robin H. Johnson <robbat2 <AT> gentoo <DOT> org>
CommitDate: Sat Nov 7 20:18:02 2015 +0000
URL: https://gitweb.gentoo.org/proj/netifrc.git/commit/?id=734e527d
net: bridge: add bridge_ and brport_ prefixes to sysfs interface
keep the no prefix to be backward compatible.
Signed-off-by: Alon Bar-Lev <alonbl <AT> gentoo.org>
doc/net.example.Linux.in | 6 +++---
net/bridge.sh | 29 +++++++++++++++++------------
2 files changed, 20 insertions(+), 15 deletions(-)
diff --git a/doc/net.example.Linux.in b/doc/net.example.Linux.in
index bcf3311..f71385d 100644
--- a/doc/net.example.Linux.in
+++ b/doc/net.example.Linux.in
@@ -919,9 +919,9 @@
# You can also configure the bridge or bridge members via sysfs on 2.6 kernels
# or newer. See the kernel bridge documentation for a description of these
# options.
-#stp_state_br0="0"
-#forward_delay_br0="10"
-#hairpin_mode_eth0="1"
+#bridge_stp_state_br0="0"
+#bridge_forward_delay_br0="10"
+#brport_hairpin_mode_eth0="1"
#-----------------------------------------------------------------------------
# RFC 2684 Bridge Support
diff --git a/net/bridge.sh b/net/bridge.sh
index 82abb71..407b578 100644
--- a/net/bridge.sh
+++ b/net/bridge.sh
@@ -125,12 +125,15 @@ bridge_pre_start()
for x in /sys/class/net/"${IFACE}"/bridge/*; do
[ -f "${x}" ] || continue
n=${x##*/}
- eval s=\$${n}_${IFVAR}
- if [ -n "${s}" ]; then
- einfo "Setting ${n}: ${s}"
- echo "${s}" >"${x}" || \
- eerror "Failed to configure $n (${n}_${IFVAR})"
- fi
+ # keep no prefix for backward compatibility
+ for prefix in "" bridge_; do
+ eval s=\$${prefix}${n}_${IFVAR}
+ if [ -n "${s}" ]; then
+ einfo "Setting ${n}: ${s}"
+ echo "${s}" >"${x}" || \
+ eerror "Failed to configure $n (${n}_${IFVAR})"
+ fi
+ done
done
if [ -n "${ports}" ]; then
@@ -161,12 +164,14 @@ bridge_pre_start()
for x in /sys/class/net/"${IFACE}"/brport/*; do
[ -f "${x}" ] || continue
n=${x##*/}
- eval s=\$${n}_${IFVAR}
- if [ -n "${s}" ]; then
- einfo "Setting ${n}@${IFACE}: ${s}"
- echo "${s}" >"${x}" || \
- eerror "Failed to configure $n (${n}_${IFVAR})"
- fi
+ for prefix in "" brport_; do
+ eval s=\$${prefix}${n}_${IFVAR}
+ if [ -n "${s}" ]; then
+ einfo "Setting ${n}@${IFACE}: ${s}"
+ echo "${s}" >"${x}" || \
+ eerror "Failed to configure $n (${n}_${IFVAR})"
+ fi
+ done
done
eend 0
done
next reply other threads:[~2015-11-08 14:30 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-08 14:30 Robin H. Johnson [this message]
-- strict thread matches above, loose matches on Subject: below --
2024-01-07 9:42 [gentoo-commits] proj/netifrc:master commit in: net/, doc/ Sam James
2023-11-25 4:54 Robin H. Johnson
2021-04-05 20:00 Robin H. Johnson
2021-04-05 20:00 Robin H. Johnson
2021-01-18 12:33 Lars Wendler
2021-01-05 14:27 Lars Wendler
2020-06-02 21:54 Robin H. Johnson
2020-05-31 23:21 Robin H. Johnson
2019-04-21 4:11 Robin H. Johnson
2015-11-08 14:30 Robin H. Johnson
2013-08-28 16:02 Robin H. Johnson
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1446927482.734e527dbe32fc3c0abdd326c485a6e69d8646f2.robbat2@OpenRC \
--to=robbat2@gentoo.org \
--cc=gentoo-commits@lists.gentoo.org \
--cc=gentoo-dev@lists.gentoo.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox