aboutsummaryrefslogtreecommitdiff
path: root/recipes/ifupdown/ifupdown_0.6.10.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/ifupdown/ifupdown_0.6.10.bb')
-rw-r--r--recipes/ifupdown/ifupdown_0.6.10.bb14
1 files changed, 13 insertions, 1 deletions
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"