bridge-utils: add brctl to the update-alternatives list
authorMike Westerhof <mwester@dls.net>
Thu, 19 Feb 2009 03:06:50 +0000 (21:06 -0600)
committerMike Westerhof <mwester@dls.net>
Thu, 19 Feb 2009 03:08:29 +0000 (21:08 -0600)
packages/bridge-utils/bridge-utils_1.2.bb

index 3f1f25d..8bb0905 100644 (file)
@@ -4,10 +4,23 @@ SECTION = "console/network"
 LICENSE = "GPL"
 DEPENDS = "sysfsutils"
 RRECOMMENDS = "kernel-module-bridge"
-PR = "r0"
+PR = "r1"
 
 SRC_URI = "${SOURCEFORGE_MIRROR}/bridge/bridge-utils-${PV}.tar.gz"
 
 inherit autotools
 
 EXTRA_OECONF = "--with-linux-headers=${STAGING_INCDIR}"
+
+do_install () {
+       autotools_do_install
+       mv ${D}${sbindir}/brtl ${D}${sbindir}/brctl.${PN}
+}
+
+pkg_postinst_${PN} () {
+       update-alternatives --install ${sbindir}/brctl brctl brctl.${PN} 100
+}
+
+pkg_prerm_${PN} () {
+       update-alternatives --remove brctl brctl.${PN}
+}