summaryrefslogtreecommitdiffstats
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:29:30 +0000
commit43c2c5b42693b94d3e4fdde2c859df743572eda1 (patch)
tree0354441a67085b7a9a28b1519909fe26fa2c0740 /meta/recipes-core/initscripts
parent77eaad86d17c6ee5acddc15ce7d9884b4c73de21 (diff)
downloadpoky-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/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 6e15f884fe..69b9bfbe32 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"
37KERNEL_VERSION = "" 37KERNEL_VERSION = ""
38 38
39inherit update-alternatives 39inherit update-alternatives
40DEPENDS_append = " update-rc.d-native"
40 41
41ALTERNATIVE_PRIORITY = "90" 42ALTERNATIVE_PRIORITY = "90"
42ALTERNATIVE_${PN} = "functions" 43ALTERNATIVE_${PN} = "functions"
@@ -64,6 +65,8 @@ do_install () {
64 install -d ${D}${sysconfdir}/rc6.d 65 install -d ${D}${sysconfdir}/rc6.d
65 install -d ${D}${sysconfdir}/default 66 install -d ${D}${sysconfdir}/default
66 install -d ${D}${sysconfdir}/default/volatiles 67 install -d ${D}${sysconfdir}/default/volatiles
68 # Holds state information pertaining to urandom
69 install -d ${D}/var/lib/urandom
67 70
68 install -m 0644 ${WORKDIR}/functions ${D}${sysconfdir}/init.d 71 install -m 0644 ${WORKDIR}/functions ${D}${sysconfdir}/init.d
69 install -m 0755 ${WORKDIR}/bootmisc.sh ${D}${sysconfdir}/init.d 72 install -m 0755 ${WORKDIR}/bootmisc.sh ${D}${sysconfdir}/init.d
@@ -84,6 +87,7 @@ do_install () {
84 install -m 0755 ${WORKDIR}/populate-volatile.sh ${D}${sysconfdir}/init.d 87 install -m 0755 ${WORKDIR}/populate-volatile.sh ${D}${sysconfdir}/init.d
85 install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d 88 install -m 0755 ${WORKDIR}/save-rtc.sh ${D}${sysconfdir}/init.d
86 install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core 89 install -m 0644 ${WORKDIR}/volatiles ${D}${sysconfdir}/default/volatiles/00_core
90
87 if [ "${TARGET_ARCH}" = "arm" ]; then 91 if [ "${TARGET_ARCH}" = "arm" ]; then
88 install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d 92 install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d
89 fi 93 fi
@@ -92,44 +96,29 @@ do_install () {
92# 96#
93 install -m 0755 ${WORKDIR}/banner.sh ${D}${sysconfdir}/init.d/banner.sh 97 install -m 0755 ${WORKDIR}/banner.sh ${D}${sysconfdir}/init.d/banner.sh
94 install -m 0755 ${WORKDIR}/umountfs ${D}${sysconfdir}/init.d/umountfs 98 install -m 0755 ${WORKDIR}/umountfs ${D}${sysconfdir}/init.d/umountfs
99 install -m 0755 ${WORKDIR}/device_table.txt ${D}${sysconfdir}/device_table
95# 100#
96# Create runlevel links 101# Create runlevel links
97# 102#
98 ln -sf ../init.d/rmnologin.sh ${D}${sysconfdir}/rc2.d/S99rmnologin.sh 103 update-rc.d -r ${D} rmnologin.sh start 99 2 3 4 5 .
99 ln -sf ../init.d/rmnologin.sh ${D}${sysconfdir}/rc3.d/S99rmnologin.sh 104 update-rc.d -r ${D} sendsigs start 20 0 6 .
100 ln -sf ../init.d/rmnologin.sh ${D}${sysconfdir}/rc4.d/S99rmnologin.sh 105 update-rc.d -r ${D} urandom start 30 S 0 6 .
101 ln -sf ../init.d/rmnologin.sh ${D}${sysconfdir}/rc5.d/S99rmnologin.sh 106 update-rc.d -r ${D} umountnfs.sh start 31 0 6 .
102 ln -sf ../init.d/sendsigs ${D}${sysconfdir}/rc6.d/S20sendsigs 107 update-rc.d -r ${D} umountfs start 40 0 6 .
103# ln -sf ../init.d/urandom ${D}${sysconfdir}/rc6.d/S30urandom 108 update-rc.d -r ${D} reboot start 90 6 .
104 ln -sf ../init.d/umountnfs.sh ${D}${sysconfdir}/rc6.d/S31umountnfs.sh 109 update-rc.d -r ${D} halt start 90 0 .
105 ln -sf ../init.d/umountfs ${D}${sysconfdir}/rc6.d/S40umountfs 110 update-rc.d -r ${D} save-rtc.sh start 25 0 6 .
106 # udev will run at S55 if installed 111 update-rc.d -r ${D} banner.sh start 02 S .
107 ln -sf ../init.d/reboot ${D}${sysconfdir}/rc6.d/S90reboot 112 update-rc.d -r ${D} checkroot.sh start 10 S .
108 ln -sf ../init.d/sendsigs ${D}${sysconfdir}/rc0.d/S20sendsigs 113 update-rc.d -r ${D} mountall.sh start 35 S .
109# ln -sf ../init.d/urandom ${D}${sysconfdir}/rc0.d/S30urandom 114 update-rc.d -r ${D} hostname.sh start 39 S .
110 ln -sf ../init.d/umountnfs.sh ${D}${sysconfdir}/rc0.d/S31umountnfs.sh 115 update-rc.d -r ${D} mountnfs.sh start 45 S .
111 ln -sf ../init.d/umountfs ${D}${sysconfdir}/rc0.d/S40umountfs 116 update-rc.d -r ${D} bootmisc.sh start 55 S .
112 # udev will run at S55 if installed 117 update-rc.d -r ${D} sysfs.sh start 02 S .
113 ln -sf ../init.d/halt ${D}${sysconfdir}/rc0.d/S90halt 118 update-rc.d -r ${D} populate-volatile.sh start 37 S .
114 ln -sf ../init.d/save-rtc.sh ${D}${sysconfdir}/rc0.d/S25save-rtc.sh 119 update-rc.d -r ${D} devpts.sh start 38 S .
115 ln -sf ../init.d/save-rtc.sh ${D}${sysconfdir}/rc6.d/S25save-rtc.sh
116 ln -sf ../init.d/banner.sh ${D}${sysconfdir}/rcS.d/S02banner.sh
117 ln -sf ../init.d/checkroot.sh ${D}${sysconfdir}/rcS.d/S10checkroot.sh
118# ln -sf ../init.d/checkfs.sh ${D}${sysconfdir}/rcS.d/S30checkfs.sh
119 ln -sf ../init.d/mountall.sh ${D}${sysconfdir}/rcS.d/S35mountall.sh
120 ln -sf ../init.d/hostname.sh ${D}${sysconfdir}/rcS.d/S39hostname.sh
121 ln -sf ../init.d/mountnfs.sh ${D}${sysconfdir}/rcS.d/S45mountnfs.sh
122 ln -sf ../init.d/bootmisc.sh ${D}${sysconfdir}/rcS.d/S55bootmisc.sh
123# ln -sf ../init.d/urandom ${D}${sysconfdir}/rcS.d/S55urandom
124 ln -sf ../init.d/sysfs.sh ${D}${sysconfdir}/rcS.d/S02sysfs.sh
125 # udev will run at S03 if installed
126 ln -sf ../init.d/populate-volatile.sh ${D}${sysconfdir}/rcS.d/S37populate-volatile.sh
127 ln -sf ../init.d/devpts.sh ${D}${sysconfdir}/rcS.d/S38devpts.sh
128 if [ "${TARGET_ARCH}" = "arm" ]; then 120 if [ "${TARGET_ARCH}" = "arm" ]; then
129 ln -sf ../init.d/alignment.sh ${D}${sysconfdir}/rcS.d/S06alignment.sh 121 update-rc.d -r ${D} alignment.sh start 06 S .
130 fi 122 fi
131 123
132 install -m 0755 ${WORKDIR}/device_table.txt ${D}${sysconfdir}/device_table
133 # Holds state information pertaining to urandom
134 install -d ${D}/var/lib/urandom
135} 124}