diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2013-10-31 14:29:46 +0800 |
---|---|---|
committer | Joe MacDonald <joe@deserted.net> | 2013-10-31 13:00:48 -0400 |
commit | fe0c58ddd2035fa04540cb09c42a9473ea797154 (patch) | |
tree | b53dfc4760468dcb4b8bba75c731c309059a7fdb /meta-networking/recipes-support/bridge-utils | |
parent | edd499dfdba1a944497185af67e307d5cef7ab9e (diff) | |
download | meta-openembedded-fe0c58ddd2035fa04540cb09c42a9473ea797154.tar.gz |
bridge-utils: inherit update-alternatives to avoid duplicate code
Inherit update-alternatives to avoid duplicate code.
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Joe MacDonald <joe@deserted.net>
Diffstat (limited to 'meta-networking/recipes-support/bridge-utils')
-rw-r--r-- | meta-networking/recipes-support/bridge-utils/bridge-utils.inc | 14 |
1 files changed, 5 insertions, 9 deletions
diff --git a/meta-networking/recipes-support/bridge-utils/bridge-utils.inc b/meta-networking/recipes-support/bridge-utils/bridge-utils.inc index bd96c6ab9..bcdc04a4f 100644 --- a/meta-networking/recipes-support/bridge-utils/bridge-utils.inc +++ b/meta-networking/recipes-support/bridge-utils/bridge-utils.inc | |||
@@ -11,7 +11,11 @@ SRC_URI = "${SOURCEFORGE_MIRROR}/bridge/bridge-utils-${PV}.tar.gz \ | |||
11 | file://bridge-utils-1.5-fix-incorrect-command-in-manual.patch \ | 11 | file://bridge-utils-1.5-fix-incorrect-command-in-manual.patch \ |
12 | " | 12 | " |
13 | 13 | ||
14 | inherit autotools | 14 | inherit autotools update-alternatives |
15 | |||
16 | ALTERNATIVE_${PN} = "brctl" | ||
17 | ALTERNATIVE_PRIORITY[brctl] = "100" | ||
18 | ALTERNATIVE_LINK_NAME[brctl] = "${sbindir}/brctl" | ||
15 | 19 | ||
16 | EXTRA_OECONF = "--with-linux-headers=${STAGING_INCDIR}" | 20 | EXTRA_OECONF = "--with-linux-headers=${STAGING_INCDIR}" |
17 | 21 | ||
@@ -23,11 +27,3 @@ do_install_append () { | |||
23 | } | 27 | } |
24 | 28 | ||
25 | RRECOMMENDS_${PN} = "kernel-module-bridge" | 29 | RRECOMMENDS_${PN} = "kernel-module-bridge" |
26 | |||
27 | pkg_postinst_${PN} () { | ||
28 | update-alternatives --install ${sbindir}/brctl brctl brctl.${PN} 100 | ||
29 | } | ||
30 | |||
31 | pkg_prerm_${PN} () { | ||
32 | update-alternatives --remove brctl brctl.${PN} | ||
33 | } | ||