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:29:30 +0000 |
commit | 43c2c5b42693b94d3e4fdde2c859df743572eda1 (patch) | |
tree | 0354441a67085b7a9a28b1519909fe26fa2c0740 /meta/recipes-core/sysvinit | |
parent | 77eaad86d17c6ee5acddc15ce7d9884b4c73de21 (diff) | |
download | poky-43c2c5b42693b94d3e4fdde2c859df743572eda1.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]
(From OE-Core rev: 66f3e3c15faedc9ee78532b4c59fa5d7148ddace)
Signed-off-by: Chen Qi <Qi.Chen@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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 de073b8a4f..39c97ac431 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}" | |||
26 | B = "${S}/src" | 26 | B = "${S}/src" |
27 | 27 | ||
28 | inherit update-alternatives | 28 | inherit update-alternatives |
29 | DEPENDS_append = " update-rc.d-native" | ||
29 | 30 | ||
30 | ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last mesg utmpdump wall" | 31 | ALTERNATIVE_${PN} = "init mountpoint halt reboot runlevel shutdown poweroff last mesg utmpdump wall" |
31 | 32 | ||
@@ -63,18 +64,20 @@ EXTRA_OEMAKE += "'base_bindir=${base_bindir}' \ | |||
63 | 64 | ||
64 | do_install () { | 65 | do_install () { |
65 | oe_runmake 'ROOT=${D}' install | 66 | oe_runmake 'ROOT=${D}' install |
67 | |||
66 | install -d ${D}${sysconfdir} \ | 68 | install -d ${D}${sysconfdir} \ |
67 | ${D}${sysconfdir}/default \ | 69 | ${D}${sysconfdir}/default \ |
68 | ${D}${sysconfdir}/init.d | 70 | ${D}${sysconfdir}/init.d |
71 | for level in S 0 1 2 3 4 5 6; do | ||
72 | install -d ${D}${sysconfdir}/rc$level.d | ||
73 | done | ||
74 | |||
69 | install -m 0644 ${WORKDIR}/rcS-default ${D}${sysconfdir}/default/rcS | 75 | install -m 0644 ${WORKDIR}/rcS-default ${D}${sysconfdir}/default/rcS |
70 | install -m 0755 ${WORKDIR}/rc ${D}${sysconfdir}/init.d | 76 | install -m 0755 ${WORKDIR}/rc ${D}${sysconfdir}/init.d |
71 | install -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d | 77 | install -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d |
72 | install -m 0755 ${WORKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd | 78 | install -m 0755 ${WORKDIR}/bootlogd.init ${D}${sysconfdir}/init.d/bootlogd |
73 | ln -sf bootlogd ${D}${sysconfdir}/init.d/stop-bootlogd | 79 | ln -sf bootlogd ${D}${sysconfdir}/init.d/stop-bootlogd |
74 | install -d ${D}${sysconfdir}/rcS.d | 80 | |
75 | ln -sf ../init.d/bootlogd ${D}${sysconfdir}/rcS.d/S07bootlogd | 81 | update-rc.d -r ${D} bootlogd start 07 S . |
76 | for level in 2 3 4 5; do | 82 | update-rc.d -r ${D} stop-bootlogd start 99 2 3 4 5 . |
77 | install -d ${D}${sysconfdir}/rc$level.d | ||
78 | ln -s ../init.d/stop-bootlogd ${D}${sysconfdir}/rc$level.d/S99stop-bootlogd | ||
79 | done | ||
80 | } | 83 | } |