aboutsummaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/initscripts
diff options
context:
space:
mode:
authorChen Qi <Qi.Chen@windriver.com>2013-01-22 15:02:42 +0800
committerRichard Purdie <richard.purdie@linuxfoundation.org>2013-01-28 12:25:35 +0000
commit66f3e3c15faedc9ee78532b4c59fa5d7148ddace (patch)
treee50fc3606ad3931c7048d3617401ae6145df09b7 /meta/recipes-core/initscripts
parentdf0d23c2bedafd534c5909a65afaf3373d7bc33e (diff)
downloadopenembedded-core-contrib-66f3e3c15faedc9ee78532b4c59fa5d7148ddace.tar.gz
openembedded-core-contrib-66f3e3c15faedc9ee78532b4c59fa5d7148ddace.tar.bz2
openembedded-core-contrib-66f3e3c15faedc9ee78532b4c59fa5d7148ddace.zip
sysvinit & initscripts: use update-rc.d
Update-rc.d provides a cleaner interface for creating links for init scripts. So we use update-rc.d to replace the redundant 'ln -sf xxx' statements. [YOCTO #3708] Signed-off-by: Chen Qi <Qi.Chen@windriver.com> Signed-off-by: Saul Wold <sgw@linux.intel.com>
Diffstat (limited to 'meta/recipes-core/initscripts')
-rw-r--r--meta/recipes-core/initscripts/initscripts_1.0.bb57
1 files changed, 23 insertions, 34 deletions
diff --git a/meta/recipes-core/initscripts/initscripts_1.0.bb b/meta/recipes-core/initscripts/initscripts_1.0.bb
index 6e15f884fee..69b9bfbe329 100644
--- a/meta/recipes-core/initscripts/initscripts_1.0.bb
+++ b/meta/recipes-core/initscripts/initscripts_1.0.bb
@@ -37,6 +37,7 @@ SRC_URI_append_arm = " file://alignment.sh"
KERNEL_VERSION = ""
inherit update-alternatives
+DEPENDS_append = " update-rc.d-native"
ALTERNATIVE_PRIORITY = "90"
ALTERNATIVE_${PN} = "functions"
@@ -64,6 +65,8 @@ do_install () {
install -d ${D}${sysconfdir}/rc6.d
install -d ${D}${sysconfdir}/default
install -d ${D}${sysconfdir}/default/volatiles
+ # Holds state information pertaining to urandom
+ install -d ${D}/var/lib/urandom
install -m 0644 ${WORKDIR}/functions ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/bootmisc.sh ${D}${sysconfdir}/init.d
@@ -84,6 +87,7 @@ do_install () {
install -m 0755 ${WORKDIR}/populate-volatile.sh ${D}${sysconfdir}/init.d
install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d
install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core
+
if [ "${TARGET_ARCH}" = "arm" ]; then
install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d
fi
@@ -92,44 +96,29 @@ do_install () {
#
install -m 0755 ${WORKDIR}/banner.sh ${D}${sysconfdir}/init.d/banner.sh
install -m 0755 ${WORKDIR}/umountfs ${D}${sysconfdir}/init.d/umountfs
+ install -m 0755 ${WORKDIR}/device_table.txt ${D}${sysconfdir}/device_table
#
# Create runlevel links
#
- ln -sf ../init.d/rmnologin.sh ${D}${sysconfdir}/rc2.d/S99rmnologin.sh
- ln -sf ../init.d/rmnologin.sh ${D}${sysconfdir}/rc3.d/S99rmnologin.sh
- ln -sf ../init.d/rmnologin.sh ${D}${sysconfdir}/rc4.d/S99rmnologin.sh
- ln -sf ../init.d/rmnologin.sh ${D}${sysconfdir}/rc5.d/S99rmnologin.sh
- ln -sf ../init.d/sendsigs ${D}${sysconfdir}/rc6.d/S20sendsigs
-# ln -sf ../init.d/urandom ${D}${sysconfdir}/rc6.d/S30urandom
- ln -sf ../init.d/umountnfs.sh ${D}${sysconfdir}/rc6.d/S31umountnfs.sh
- ln -sf ../init.d/umountfs ${D}${sysconfdir}/rc6.d/S40umountfs
- # udev will run at S55 if installed
- ln -sf ../init.d/reboot ${D}${sysconfdir}/rc6.d/S90reboot
- ln -sf ../init.d/sendsigs ${D}${sysconfdir}/rc0.d/S20sendsigs
-# ln -sf ../init.d/urandom ${D}${sysconfdir}/rc0.d/S30urandom
- ln -sf ../init.d/umountnfs.sh ${D}${sysconfdir}/rc0.d/S31umountnfs.sh
- ln -sf ../init.d/umountfs ${D}${sysconfdir}/rc0.d/S40umountfs
- # udev will run at S55 if installed
- ln -sf ../init.d/halt ${D}${sysconfdir}/rc0.d/S90halt
- ln -sf ../init.d/save-rtc.sh ${D}${sysconfdir}/rc0.d/S25save-rtc.sh
- ln -sf ../init.d/save-rtc.sh ${D}${sysconfdir}/rc6.d/S25save-rtc.sh
- ln -sf ../init.d/banner.sh ${D}${sysconfdir}/rcS.d/S02banner.sh
- ln -sf ../init.d/checkroot.sh ${D}${sysconfdir}/rcS.d/S10checkroot.sh
-# ln -sf ../init.d/checkfs.sh ${D}${sysconfdir}/rcS.d/S30checkfs.sh
- ln -sf ../init.d/mountall.sh ${D}${sysconfdir}/rcS.d/S35mountall.sh
- ln -sf ../init.d/hostname.sh ${D}${sysconfdir}/rcS.d/S39hostname.sh
- ln -sf ../init.d/mountnfs.sh ${D}${sysconfdir}/rcS.d/S45mountnfs.sh
- ln -sf ../init.d/bootmisc.sh ${D}${sysconfdir}/rcS.d/S55bootmisc.sh
-# ln -sf ../init.d/urandom ${D}${sysconfdir}/rcS.d/S55urandom
- ln -sf ../init.d/sysfs.sh ${D}${sysconfdir}/rcS.d/S02sysfs.sh
- # udev will run at S03 if installed
- ln -sf ../init.d/populate-volatile.sh ${D}${sysconfdir}/rcS.d/S37populate-volatile.sh
- ln -sf ../init.d/devpts.sh ${D}${sysconfdir}/rcS.d/S38devpts.sh
+ update-rc.d -r ${D} rmnologin.sh start 99 2 3 4 5 .
+ update-rc.d -r ${D} sendsigs start 20 0 6 .
+ update-rc.d -r ${D} urandom start 30 S 0 6 .
+ update-rc.d -r ${D} umountnfs.sh start 31 0 6 .
+ update-rc.d -r ${D} umountfs start 40 0 6 .
+ update-rc.d -r ${D} reboot start 90 6 .
+ update-rc.d -r ${D} halt start 90 0 .
+ update-rc.d -r ${D} save-rtc.sh start 25 0 6 .
+ update-rc.d -r ${D} banner.sh start 02 S .
+ update-rc.d -r ${D} checkroot.sh start 10 S .
+ update-rc.d -r ${D} mountall.sh start 35 S .
+ update-rc.d -r ${D} hostname.sh start 39 S .
+ update-rc.d -r ${D} mountnfs.sh start 45 S .
+ update-rc.d -r ${D} bootmisc.sh start 55 S .
+ update-rc.d -r ${D} sysfs.sh start 02 S .
+ update-rc.d -r ${D} populate-volatile.sh start 37 S .
+ update-rc.d -r ${D} devpts.sh start 38 S .
if [ "${TARGET_ARCH}" = "arm" ]; then
- ln -sf ../init.d/alignment.sh ${D}${sysconfdir}/rcS.d/S06alignment.sh
+ update-rc.d -r ${D} alignment.sh start 06 S .
fi
- install -m 0755 ${WORKDIR}/device_table.txt ${D}${sysconfdir}/device_table
- # Holds state information pertaining to urandom
- install -d ${D}/var/lib/urandom
}