2 DESCRIPTION = "System-V like init."
4 MAINTAINER = "Chris Larson <kergoth@handhelds.org>"
5 FILES_${PN} += "/sbin /bin"
9 mach = oe.data.getVar('MACHINE', d, 1)
11 oe.data.setVar('PACKAGE_ARCH', oe.data.getVar('MACHINE_ARCH', d, 1), d)
16 SRC_URI = "ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/sysvinit-2.85.tar.gz \
17 file://sysvinit-2.86.patch;patch=1 \
18 file://install.patch;patch=1 \
25 S = "${WORKDIR}/sysvinit-2.85"
28 CFLAGS_prepend = "-D_GNU_SOURCE "
29 export LCRYPT = "-lcrypt"
30 EXTRA_OEMAKE += "'INSTALL=install' \
33 'usrbindir=${bindir}' \
34 'usrsbindir=${sbindir}' \
35 'includedir=${includedir}' \
39 oe_runmake 'ROOT=${D}' install
40 install -d ${D}/${sysconfdir} \
41 ${D}/${sysconfdir}/default \
42 ${D}/${sysconfdir}/init.d
43 install -m 0644 ${WORKDIR}/inittab ${D}/${sysconfdir}/inittab
44 if [ ! -z "${SERIAL_CONSOLE}" ]; then
45 echo "S:2345:respawn:/sbin/getty ${SERIAL_CONSOLE}" >> ${D}/etc/inittab
47 if [ "${USE_VT}" == "1" ]; then
48 cat <<EOF >>${D}/etc/inittab
49 # /sbin/getty invocations for the runlevels.
51 # The "id" field MUST be the same as the last
52 # characters of the device (after "tty").
55 # <id>:<runlevels>:<action>:<process>
57 1:2345:respawn:/sbin/getty 38400 tty1
58 # 2:23:respawn:/sbin/getty 38400 tty2
59 # 3:23:respawn:/sbin/getty 38400 tty3
60 # 4:23:respawn:/sbin/getty 38400 tty4
63 install -m 0644 ${WORKDIR}/rcS-default ${D}/etc/default/rcS
64 install -m 0755 ${WORKDIR}/rc ${D}/etc/init.d
65 install -m 0755 ${WORKDIR}/rcS ${D}/etc/init.d
69 do_install_append_ramses () {
70 cat <<EOF >>${D}/etc/inittab
72 #1:2345:respawn:/sbin/getty -L 115200 tts/1
73 # External serial port
74 4:2345:respawn:/sbin/getty -L 115200 tts/4
76 v1:2345:respawn:/sbin/getty -L 115200 vc/1