aboutsummaryrefslogtreecommitdiff
path: root/recipes/ifupdown/ifupdown-ubuntu_0.6.8.bb
diff options
context:
space:
mode:
Diffstat (limited to 'recipes/ifupdown/ifupdown-ubuntu_0.6.8.bb')
-rw-r--r--recipes/ifupdown/ifupdown-ubuntu_0.6.8.bb16
1 files changed, 14 insertions, 2 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 ."
-