All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Oberritter <obi@opendreambox.org>
To: openembedded-core@lists.openembedded.org
Subject: [PATCH 3/4] sysvinit: use update-alternatives for mountpoint and runlevel
Date: Fri, 23 Mar 2012 17:37:38 +0100	[thread overview]
Message-ID: <1332520659-12233-3-git-send-email-obi@opendreambox.org> (raw)
In-Reply-To: <1332520659-12233-1-git-send-email-obi@opendreambox.org>

* mountpoint and runlevel may be provided by busybox.
* Use update-alternatives to avoid conflict.

Signed-off-by: Andreas Oberritter <obi@opendreambox.org>
---
 meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
index 663e298..d3e430c 100644
--- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
+++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb
@@ -5,7 +5,7 @@ SECTION = "base"
 LICENSE = "GPLv2+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe \
                     file://COPYRIGHT;endline=15;md5=349c872e0066155e1818b786938876a4"
-PR = "r5"
+PR = "r6"
 
 RDEPENDS_${PN} = "${PN}-inittab"
 
@@ -66,9 +66,11 @@ do_install () {
 		ln -s ../init.d/stop-bootlogd ${D}${sysconfdir}/rc$level.d/S99stop-bootlogd
 	done
 	mv                 ${D}${base_sbindir}/init               ${D}${base_sbindir}/init.${BPN}
+	mv ${D}${base_bindir}/mountpoint ${D}${base_bindir}/mountpoint.${BPN}
 	mv ${D}${base_bindir}/pidof ${D}${base_bindir}/pidof.${BPN}
 	mv ${D}${base_sbindir}/halt ${D}${base_sbindir}/halt.${BPN}
 	mv ${D}${base_sbindir}/reboot ${D}${base_sbindir}/reboot.${BPN}
+	mv ${D}${base_sbindir}/runlevel ${D}${base_sbindir}/runlevel.${BPN}
 	mv ${D}${base_sbindir}/shutdown ${D}${base_sbindir}/shutdown.${BPN}
 	mv ${D}${base_sbindir}/poweroff ${D}${base_sbindir}/poweroff.${BPN}
 	mv ${D}${bindir}/last ${D}${bindir}/last.${BPN}
@@ -77,8 +79,10 @@ do_install () {
 }
 
 pkg_postinst_${PN} () {
+	update-alternatives --install ${base_bindir}/mountpoint mountpoint mountpoint.${BPN} 200
 	update-alternatives --install ${base_sbindir}/halt halt halt.${BPN} 200
 	update-alternatives --install ${base_sbindir}/reboot reboot reboot.${BPN} 200
+	update-alternatives --install ${base_sbindir}/runlevel runlevel runlevel.${BPN} 200
 	update-alternatives --install ${base_sbindir}/shutdown shutdown shutdown.${BPN} 200
 	update-alternatives --install ${base_sbindir}/poweroff poweroff poweroff.${BPN} 200
 	update-alternatives --install ${bindir}/last last last.${BPN} 200
@@ -87,8 +91,10 @@ pkg_postinst_${PN} () {
 }
 
 pkg_prerm_${PN} () {
+	update-alternatives --remove mountpoint mountpoint.${BPN}
 	update-alternatives --remove halt halt.${BPN}
 	update-alternatives --remove reboot reboot.${BPN}
+	update-alternatives --remove runlevel runlevel.${BPN}
 	update-alternatives --remove shutdown shutdown.${BPN}
 	update-alternatives --remove poweroff poweroff.${BPN}
 	update-alternatives --remove last last.${BPN}
-- 
1.7.5.4




  parent reply	other threads:[~2012-03-23 16:46 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-03-23 16:37 [PATCH 1/4] procps: use update-alternatives for pwdx, pgrep and watch Andreas Oberritter
2012-03-23 16:37 ` [PATCH 2/4] module.bbclass: sync pkg_post{inst, rm} with kernel.bbclass Andreas Oberritter
2012-03-23 17:20   ` Koen Kooi
2012-03-23 17:58     ` Andreas Oberritter
2012-03-23 18:20       ` Koen Kooi
2012-03-23 18:32         ` Richard Purdie
2012-03-23 17:39   ` Richard Purdie
2012-03-23 18:00     ` Andreas Oberritter
2012-03-23 16:37 ` Andreas Oberritter [this message]
2012-03-23 16:37 ` [PATCH 4/4] ppp: drop unneeded pkg-postinst Andreas Oberritter
2012-04-03 21:53 ` [PATCH 1/4] procps: use update-alternatives for pwdx, pgrep and watch Saul Wold

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1332520659-12233-3-git-send-email-obi@opendreambox.org \
    --to=obi@opendreambox.org \
    --cc=openembedded-core@lists.openembedded.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.