2 DESCRIPTION = "System-V like init."
4 MAINTAINER = "Chris Larson <kergoth@handhelds.org>"
5 HOMEPAGE = "http://freshmeat.net/projects/sysvinit/"
7 FILES_${PN} += "/sbin /bin"
10 # USE_VT and SERIAL_CONSLE are generally defined by the MACHINE .conf.
11 # Set PACKAGE_ARCH appropriately.
12 PACKAGE_ARCH := "${MACHINE_ARCH}"
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 \
26 S = "${WORKDIR}/sysvinit-2.85"
29 CFLAGS_prepend = "-D_GNU_SOURCE "
30 export LCRYPT = "-lcrypt"
31 EXTRA_OEMAKE += "'INSTALL=install' \
34 'usrbindir=${bindir}' \
35 'usrsbindir=${sbindir}' \
36 'includedir=${includedir}' \
40 oe_runmake 'ROOT=${D}' install
41 install -d ${D}/${sysconfdir} \
42 ${D}/${sysconfdir}/default \
43 ${D}/${sysconfdir}/init.d
44 install -m 0644 ${WORKDIR}/inittab ${D}/${sysconfdir}/inittab
45 if [ ! -z "${SERIAL_CONSOLE}" ]; then
46 echo "S:2345:respawn:/sbin/getty ${SERIAL_CONSOLE}" >> ${D}/etc/inittab
48 if [ "${USE_VT}" == "1" ]; then
49 cat <<EOF >>${D}/etc/inittab
50 # /sbin/getty invocations for the runlevels.
52 # The "id" field MUST be the same as the last
53 # characters of the device (after "tty").
56 # <id>:<runlevels>:<action>:<process>
58 1:2345:respawn:/sbin/getty 38400 tty1
59 # 2:23:respawn:/sbin/getty 38400 tty2
60 # 3:23:respawn:/sbin/getty 38400 tty3
61 # 4:23:respawn:/sbin/getty 38400 tty4
64 install -m 0644 ${WORKDIR}/rcS-default ${D}/etc/default/rcS
65 install -m 0755 ${WORKDIR}/rc ${D}/etc/init.d
66 install -m 0755 ${WORKDIR}/rcS ${D}/etc/init.d
67 install -m 0755 ${WORKDIR}/bootlogd.init ${D}/etc/init.d/bootlogd
68 ln -sf bootlogd ${D}/etc/init.d/stop-bootlogd
69 install -d ${D}/etc/rcS.d
70 ln -sf ../init.d/bootlogd ${D}/etc/rcS.d/S07bootlogd
71 for level in 2 3 4 5; do
72 install -d ${D}/etc/rc$level.d
73 ln -s ../init.d/stop-bootlogd ${D}/etc/rc$level.d/
78 do_install_append_ramses () {
79 cat <<EOF >>${D}/etc/inittab
81 #1:2345:respawn:/sbin/getty -L 115200 tts/1
82 # External serial port
83 4:2345:respawn:/sbin/getty -L 115200 tts/4
85 v1:2345:respawn:/sbin/getty -L 115200 vc/1