checksums.ini: add checksum for pengutronix canutils
[openembedded.git] / packages / initscripts / initscripts-slugos_1.0.bb
blob29209dbf6a959db9229f06703e8590aaaf717723
1 # SlugOS specific stuff for the init scripts.
3 # This is, in effect, an extended patch to fix various
4 # problems in the initscripts on SlugOS. The problems
5 # mostly come down to the order the scripts are executed
6 # in.
7 include initscripts_${PV}.bb
9 RCONFLICTS = "initscripts"
11 # SlugOS uses the busybox makedevs, so until that dependency gets virtualized
12 # the below lines serve to remove the dependency on the full makedevs package:
13 DEPENDS = ""
14 RDEPENDS = ""
16 # All other standard definitions inherited from initscripts
17 # Except the PR which is hacked here. The format used is
18 # a suffix
19 PR := "${PR}.19"
21 FILESPATH = "${@base_set_filespath([ '${FILE_DIRNAME}/${P}', '${FILE_DIRNAME}/initscripts-${PV}', '${FILE_DIRNAME}/files', '${FILE_DIRNAME}' ], d)}"
23 PACKAGES = "${PN}-dbg ${PN}"
25 SRC_URI += "file://alignment.sh"
26 SRC_URI += "file://domainname.sh"
27 SRC_URI += "file://devices.patch;patch=1"
28 SRC_URI += "file://bootclean.sh"
30 # Without this it is not possible to patch checkroot
31 S = "${WORKDIR}"
33 do_install_append() {
34 # the image build command now installs this for slugos
35 rm ${D}${sysconfdir}/device_table
37 # slugos specific scripts
38 install -m 0755 ${WORKDIR}/alignment.sh ${D}${sysconfdir}/init.d
39 install -m 0755 ${WORKDIR}/domainname.sh ${D}${sysconfdir}/init.d
40 install -m 0755 ${WORKDIR}/bootclean.sh ${D}${sysconfdir}/init.d
41 install -m 0755 ${WORKDIR}/checkroot ${D}${sysconfdir}/init.d
43 # Remove the do install links (this detects a change to the
44 # initscripts .bb file - it will cause a build failure here.)
45 # This is a copy of the ln -sf lines from the initscripts
46 # do_install.
47 rm ${D}${sysconfdir}/rc2.d/S99rmnologin
48 rm ${D}${sysconfdir}/rc3.d/S99rmnologin
49 rm ${D}${sysconfdir}/rc4.d/S99rmnologin
50 rm ${D}${sysconfdir}/rc5.d/S99rmnologin
51 rm ${D}${sysconfdir}/rc6.d/S20sendsigs
52 # rm ${D}${sysconfdir}/rc6.d/S30urandom
53 rm ${D}${sysconfdir}/rc6.d/S31umountnfs.sh
54 rm ${D}${sysconfdir}/rc6.d/S40umountfs
55 rm ${D}${sysconfdir}/rcS.d/S30ramdisk
56 rm ${D}${sysconfdir}/rc6.d/S90reboot
57 rm ${D}${sysconfdir}/rc0.d/S20sendsigs
58 # rm ${D}${sysconfdir}/rc0.d/S30urandom
59 rm ${D}${sysconfdir}/rc0.d/S31umountnfs.sh
60 rm ${D}${sysconfdir}/rc0.d/S40umountfs
61 rm ${D}${sysconfdir}/rc0.d/S90halt
62 rm ${D}${sysconfdir}/rcS.d/S02banner
63 rm ${D}${sysconfdir}/rcS.d/S10checkroot
64 # rm ${D}${sysconfdir}/rcS.d/S30checkfs.sh
65 rm ${D}${sysconfdir}/rcS.d/S35mountall.sh
66 rm ${D}${sysconfdir}/rcS.d/S39hostname.sh
67 rm ${D}${sysconfdir}/rcS.d/S45mountnfs.sh
68 rm ${D}${sysconfdir}/rcS.d/S55bootmisc.sh
69 # rm ${D}${sysconfdir}/rcS.d/S55urandom
70 rm ${D}${sysconfdir}/rcS.d/S99finish.sh
71 rm ${D}${sysconfdir}/rcS.d/S05devices
72 # udev will run at S04 if installed
73 rm ${D}${sysconfdir}/rcS.d/S03sysfs
74 rm ${D}${sysconfdir}/rcS.d/S38devpts.sh
75 rm -f ${D}${sysconfdir}/rcS.d/S06alignment
76 rm ${D}${sysconfdir}/rcS.d/S37populate-volatile.sh
77 rm ${D}${sysconfdir}/rc0.d/S25save-rtc.sh
78 rm ${D}${sysconfdir}/rc6.d/S25save-rtc.sh
82 # Check the result
83 find ${D}${sysconfdir}/rc?.d ! -type d -print | {
84 status=0
85 while read d
87 oenote "initscripts-slugos: unexpected link $d"
88 status=1
89 done
90 test $status -eq 0 ||
91 oefatal "initscripts-slugos: new links break do_install"
94 # Set the run-level links
96 # Startup (S) links - UNCHANGED
98 # Keep these in order of startup - S, then 1, 2-5, 0,6
99 # according to the level in which the script starts (or stops) first.
100 update-rc.d -r ${D} banner start 2 S .
101 update-rc.d -r ${D} sysfs.sh start 3 S .
102 # udev runs at S 04 .
103 update-rc.d -r ${D} devices start 5 S .
104 update-rc.d -r ${D} alignment.sh start 7 S .
105 # busybox hwclock.sh (slugos-init) starts here (08)
106 # slugos-init umountinitrd runs here (09)
108 update-rc.d -r ${D} checkroot start 10 S .
109 # slugos buffer syslog starts here (11)
110 # sysconfsetup runs at S 12
111 # modutils.sh runs at S 20
112 # checkfs.sh is currently disabled from S 30 (and won't work on SlugOS)
113 # ramdisk is not used on SlugOS, would run at S 30
114 update-rc.d -r ${D} mountall.sh start 35 S .
115 # bootclean must run after mountall but before populate-volatile
116 update-rc.d -r ${D} bootclean.sh start 36 S .
117 # base-files populate-volatile.sh runs at S37
118 update-rc.d -r ${D} devpts.sh start 38 S .
119 # slugos file syslog starts here (39)
120 update-rc.d -r ${D} populate-volatile.sh start 37 S .
122 # set hostname and domainname before the network script works (by
123 # entering them at level 40), networking may reset them.
124 update-rc.d -r ${D} domainname.sh start 40 S .
125 update-rc.d -r ${D} hostname.sh start 40 S .
126 # network runs at S 40
127 # slugos network syslog starts here (44)
128 update-rc.d -r ${D} mountnfs.sh start 45 S .
130 update-rc.d -r ${D} bootmisc.sh start 55 S .
131 # urandom is currently disabled from S 55 (and won't work with tmpfs /var)
133 # ipkg-cl configure runs at S 98
134 update-rc.d -r ${D} finish.sh start 99 S .
137 # User (2-5) links - UNCHANGED
138 # rmnologin is the only thing added to user levels
139 update-rc.d -r ${D} rmnologin start 99 2 3 4 5 .
142 # Shutdown (0,6) links - !!!CHANGED!!!
144 # The problem here is that netbase installs K40networking but portmap
145 # installs S32portmap. One of these has to change! The safe change
146 # is to make the networking stop at S40, so all network related shutdown
147 # must be in a K script or <S40.
149 # S20sendsigs is a disaster. It needs to happen before the umounts
150 # but after the portmapper (which it would otherwise kill).
152 # urandom would stop at (S)30
154 # This is the special, correct, slugos umountnfs.sh (it looks in
155 # the /proc/mounts information, not /etc/fstab)
156 update-rc.d -r ${D} umountnfs.sh start 31 0 6 .
157 update-rc.d -r ${D} save-rtc.sh start 25 0 6 .
158 # portmap stops at 32
159 # slugos network syslog stops here (39)
160 # networking stops at 40 (nothing else does, believe me.)
162 # busybox hwclock.sh (slugos-init) stops here (45)
163 # slugos file syslog stops here (47)
164 # slugos buffer syslog stops here (49)
165 # udev stops here (55)
166 # Remove any errant processes
167 update-rc.d -r ${D} sendsigs start 60 0 6 .
169 # This is the special, correct, slugos umountfs, it will umount
170 # any network file systems which failed to umount before.
171 update-rc.d -r ${D} umountfs start 70 0 6 .
173 update-rc.d -r ${D} halt start 90 0 .
174 update-rc.d -r ${D} reboot start 90 6 .