diff options
author | Chen Qi <Qi.Chen@windriver.com> | 2013-01-22 15:02:42 +0800 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2013-01-28 12:25:35 +0000 |
commit | 66f3e3c15faedc9ee78532b4c59fa5d7148ddace (patch) | |
tree | e50fc3606ad3931c7048d3617401ae6145df09b7 /meta/recipes-core/sysvinit | |
parent | df0d23c2bedafd534c5909a65afaf3373d7bc33e (diff) | |
download | openembedded-core-contrib-66f3e3c15faedc9ee78532b4c59fa5d7148ddace.tar.gz |
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/sysvinit')
-rw-r--r-- | meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb | 15 |
1 files changed, 9 insertions, 6 deletions
diff --git a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb index de073b8a4f3..39c97ac431d 100644 --- a/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb +++ b/meta/recipes-core/sysvinit/sysvinit_2.88dsf.bb @@ -26,6 +26,7 @@ S = "${WORKDIR}/sysvinit-${PV}" B = "${S}/src" inherit update-alternatives +DEPENDS_append = " update-rc.d-native" ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last mesg utmpdump wall" @@ -63,18 +64,20 @@ EXTRA_OEMAKE += "'base_bindir=${base_bindir}' \ do_install () { oe_runmake 'ROOT=${D}' install + install -d ${D}${sysconfdir} \ ${D}${sysconfdir}/default \ ${D}${sysconfdir}/init.d + for level in S 0 1 2 3 4 5 6; do + install -d ${D}${sysconfdir}/rc$level.d + done + install -m 0644 ${WORKDIR}/rcS-default ${D}${sysconfdir}/default/rcS install -m 0755 ${WORKDIR}/rc ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d install -m 0755 ${WORKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd ln -sf bootlogd ${D}${sysconfdir}/init.d/stop-bootlogd - install -d ${D}${sysconfdir}/rcS.d - ln -sf ../init.d/bootlogd ${D}${sysconfdir}/rcS.d/S07bootlogd - for level in 2 3 4 5; do - install -d ${D}${sysconfdir}/rc$level.d - ln -s ../init.d/stop-bootlogd ${D}${sysconfdir}/rc$level.d/S99stop-bootlogd - done + + update-rc.d -r ${D} bootlogd start 07 S . + update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 . } |