diff mbox series

[meta-networking] ebtables: Use update alternatives for "ebtables"

Message ID 20260402134349.2558762-1-xiao.zhang@windriver.com
State Under Review
Headers show
Series [meta-networking] ebtables: Use update alternatives for "ebtables" | expand

Commit Message

Zhang Xiao April 2, 2026, 1:43 p.m. UTC
The ebtables utility can be provided by both ebtables and iptables
packages. Set higher priority for the version provided by iptables
to prefer it.

Signed-off-by: Zhang Xiao <xiao.zhang@windriver.com>
---
 meta-networking/recipes-filter/ebtables/ebtables_2.0.11.bb | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
diff mbox series

Patch

diff --git a/meta-networking/recipes-filter/ebtables/ebtables_2.0.11.bb b/meta-networking/recipes-filter/ebtables/ebtables_2.0.11.bb
index be8c49854e..5ae30e440c 100644
--- a/meta-networking/recipes-filter/ebtables/ebtables_2.0.11.bb
+++ b/meta-networking/recipes-filter/ebtables/ebtables_2.0.11.bb
@@ -21,7 +21,7 @@  SRC_URI:append:libc-musl = " file://0010-Adjust-header-include-sequence.patch"
 SRC_URI[md5sum] = "071c8b0a59241667a0044fb040d4fc72"
 SRC_URI[sha256sum] = "b71f654784a726329f88b412ef7b96b4e5d786ed2bd28193ed7b4c0d677dfd2a"
 
-inherit systemd autotools
+inherit systemd autotools update-alternatives
 
 do_install:append () {
 	# Replace upstream ebtables-save perl script with Fedora bash based rewrite
@@ -49,3 +49,7 @@  FILES:${PN}-dbg += "${base_libdir}/ebtables/.debug"
 FILES:${PN} += "${base_libdir}/ebtables/*.so"
 
 SYSTEMD_SERVICE:${PN} = "ebtables.service"
+
+ALTERNATIVE:${PN} = "ebtables"
+ALTERNATIVE_LINK_NAME[ebtables] = "${sbindir}/ebtables"
+ALTERNATIVE_PRIORITY[ebtables] = "90"