aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTom Rini <tom_rini@mentor.com>2010-11-11 20:07:40 -0700
committerTom Rini <tom_rini@mentor.com>2010-11-11 20:07:40 -0700
commit8e9b64410d45ad9c04658a49f876116cdf1994e0 (patch)
tree32f46b19fde224de6a0399bdf320412c6060268d
parentc711c4c6556bb8744023f3e44edffafc2d2fbfac (diff)
downloadopenembedded-8e9b64410d45ad9c04658a49f876116cdf1994e0.zip
openembedded-8e9b64410d45ad9c04658a49f876116cdf1994e0.tar.gz
openembedded-8e9b64410d45ad9c04658a49f876116cdf1994e0.tar.bz2
ifupdown: Add update-alternatives
Signed-off-by: Tom Rini <tom_rini@mentor.com>
-rw-r--r--recipes/ifupdown/ifupdown-ubuntu_0.6.8.bb16
-rw-r--r--recipes/ifupdown/ifupdown_0.6.10.bb14
2 files changed, 27 insertions, 3 deletions
diff --git a/recipes/ifupdown/ifupdown-ubuntu_0.6.8.bb b/recipes/ifupdown/ifupdown-ubuntu_0.6.8.bb
index 3c8de81..3cccdb2 100644
--- a/recipes/ifupdown/ifupdown-ubuntu_0.6.8.bb
+++ b/recipes/ifupdown/ifupdown-ubuntu_0.6.8.bb
@@ -8,7 +8,7 @@ SECTION = "base"
PROVIDES = "ifupdown"
-PR = "r2"
+PR = "r3"
inherit update-rc.d
@@ -39,7 +39,19 @@ do_install () {
install -m 0644 ifup.8 ${D}${mandir}/man8
install -m 0644 interfaces.5 ${D}${mandir}/man5
cd ${D}${mandir}/man8 && ln -s ifup.8 ifdown.8
+ mv ${D}${base_sbindir}/ifup ${D}${base_sbindir}/ifup.${PN}
+ mv ${D}${base_sbindir}/ifdown ${D}${base_sbindir}/ifdown.${PN}
}
+
+pkg_postinst_${PN} () {
+ update-alternatives --install ${base_sbindir}/ifup ifup ifup.${PN} 100
+ update-alternatives --install ${base_sbindir}/ifdown ifdown ifdown.${PN} 100
+}
+
+pkg_prerm_${PN} () {
+ update-alternatives --remove ifup ifup.${PN}
+ update-alternatives --remove ifdown ifdown.${PN}
+}
+
INITSCRIPT_NAME = "ifup"
INITSCRIPT_PARAMS = "start 39 S . stop 39 0 6 1 ."
-
diff --git a/recipes/ifupdown/ifupdown_0.6.10.bb b/recipes/ifupdown/ifupdown_0.6.10.bb
index 31e24d5..04d6870 100644
--- a/recipes/ifupdown/ifupdown_0.6.10.bb
+++ b/recipes/ifupdown/ifupdown_0.6.10.bb
@@ -4,7 +4,7 @@ configure (or, respectively, deconfigure) network interfaces, based on \
the file /etc/network/interfaces."
LICENSE = "GPL"
SECTION = "base"
-PR = "r2"
+PR = "r3"
SRC_URI = "${DEBIAN_MIRROR}/main/i/ifupdown/ifupdown_${PV}.tar.gz;name=ifupdown \
@@ -33,6 +33,18 @@ do_install () {
install -m 0644 ifup.8 ${D}${mandir}/man8
install -m 0644 interfaces.5 ${D}${mandir}/man5
cd ${D}${mandir}/man8 && ln -s ifup.8 ifdown.8
+ mv ${D}${base_sbindir}/ifup ${D}${base_sbindir}/ifup.${PN}
+ mv ${D}${base_sbindir}/ifdown ${D}${base_sbindir}/ifdown.${PN}
+}
+
+pkg_postinst_${PN} () {
+ update-alternatives --install ${base_sbindir}/ifup ifup ifup.${PN} 100
+ update-alternatives --install ${base_sbindir}/ifdown ifdown ifdown.${PN} 100
+}
+
+pkg_prerm_${PN} () {
+ update-alternatives --remove ifup ifup.${PN}
+ update-alternatives --remove ifdown ifdown.${PN}
}
INITSCRIPT_NAME = "ifup"