Hi,

bridge-utils conflicts with busybox brctl. Allow the package
to be installed and mimic the GNU tar package behavior.

Signed-off-by: Waldemar Brodkorb <m...@waldemar-brodkorb.de>

Index: net/bridge-utils/Makefile
===================================================================
--- net/bridge-utils/Makefile   (Revision 35899)
+++ net/bridge-utils/Makefile   (Arbeitskopie)
@@ -9,7 +9,7 @@
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=bridge-utils
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_SOURCE_URL:=@SF/bridge
 PKG_VERSION:=1.5
 PKG_MD5SUM:=ec7b381160b340648dede58c31bb2238
@@ -44,8 +44,24 @@
 endef
 
 define Package/bridge/install
-       $(INSTALL_DIR) $(1)/usr/sbin
-       $(INSTALL_BIN) $(PKG_BUILD_DIR)/brctl/brctl $(1)/usr/sbin
+       $(INSTALL_DIR) $(1)/sbin
+       $(INSTALL_BIN) $(PKG_BUILD_DIR)/brctl/brctl $(1)/sbin
 endef
 
+define Package/bridge/postinst
+#!/bin/sh
+if [ -e $${IPKG_INSTROOT}/usr/sbin/brctl ]; then
+  rm -r $${IPKG_INSTROOT}/usr/sbin/brctl;
+fi
+ln -sf /sbin/brctl $${IPKG_INSTROOT}/usr/sbin/brctl
+endef
+
+define Package/bridge/postrm
+#!/bin/sh
+rm $${IPKG_INSTROOT}/usr/sbin/brctl
+ln -s ../../bin/busybox $${IPKG_INSTROOT}/usr/sbin/brctl
+$${IPKG_INSTROOT}/usr/sbin/brctl 2>&1 | grep 'applet not found' > /dev/null 
2>&1 && rm $${IPKG_INSTROOT}/usr/sbin/brctl
+exit 0
+endef
+
 $(eval $(call BuildPackage,bridge))
_______________________________________________
openwrt-devel mailing list
openwrt-devel@lists.openwrt.org
https://lists.openwrt.org/mailman/listinfo/openwrt-devel

Reply via email to