2 DESCRIPTION = "System-V like init.\
3 Init is the first program to run after your system is booted, and\
4 continues to run as process number 1 until your system halts. Inits\
5 job is to start other programs that are essential to the operation of\
6 your system. All processes are descended from init. For more information,\
7 see the manual page init(8)."
9 FILES_${PN} = "/sbin ${bindir} ${sysconfdir}"
10 FILES_sysv-rc = "${sbindir}"
13 # USE_VT and SERIAL_CONSLE are generally defined by the MACHINE .conf.
14 # Set PACKAGE_ARCH appropriately.
15 PACKAGE_ARCH := "${MACHINE_ARCH}"
19 SRC_URI = "ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/sysvinit-${PV}.tar.gz \
26 S = "${WORKDIR}/sysvinit-${PV}/src"
28 CFLAGS_prepend = "-D_GNU_SOURCE "
29 export LCRYPT = "-lcrypt"
33 install -d ${D}/${bindir} ${D}/${sbindir} \
34 ${D}/sbin ${D}/${sysconfdir}/default \
35 ${D}/${sysconfdir}/init.d
36 install -m 755 halt killall5 \
37 runlevel shutdown ${D}/sbin/
38 install -m 755 init ${D}/sbin/sysvinit
39 install -m 755 mesg last ${D}${bindir}
40 install -m 0755 ${WORKDIR}/need ${D}/sbin/need.sysvinit
41 install -m 0755 ${WORKDIR}/provide ${D}/sbin/provide.sysvinit
42 ln -sf halt ${D}/sbin/reboot
43 ln -sf halt ${D}/sbin/poweroff
44 ln -sf init ${D}/sbin/telinit
45 ln -sf killall5 ${D}/sbin/pidof
46 ln -sf last ${D}${bindir}/lastb
47 install -m 0644 ${WORKDIR}/inittab ${D}/${sysconfdir}/inittab
48 if [ ! -z "${SERIAL_CONSOLE}" ]; then
49 echo "S:2345:respawn:/sbin/getty ${SERIAL_CONSOLE}" >> ${D}/etc/inittab
51 if [ "${USE_VT}" == "1" ]; then
52 cat <<EOF >>${D}/etc/inittab
53 # /sbin/getty invocations for the runlevels.
55 # The "id" field MUST be the same as the last
56 # characters of the device (after "tty").
59 # <id>:<runlevels>:<action>:<process>
61 1:2345:respawn:/sbin/getty 38400 tty1
62 # 2:23:respawn:/sbin/getty 38400 tty2
63 # 3:23:respawn:/sbin/getty 38400 tty3
64 # 4:23:respawn:/sbin/getty 38400 tty4
67 install -m 0644 ${WORKDIR}/rcS-default ${D}/etc/default/rcS
68 install -m 0755 ${WORKDIR}/rc ${D}/etc/init.d
69 install -m 0755 ${WORKDIR}/rcS ${D}/etc/init.d
73 do_install_append_ramses () {
74 cat <<EOF >>${D}/etc/inittab
76 #1:2345:respawn:/sbin/getty -L 115200 tts/1
77 # External serial port
78 4:2345:respawn:/sbin/getty -L 115200 tts/4
80 v1:2345:respawn:/sbin/getty -L 115200 vc/1
87 # FIXME: use update-alternatives.. but what if the user doesnt have it?
88 #if [ -n "`which update-alternatives 2>/dev/null`" ]; then
89 # update-alternatives blah
91 ln -sf sysvinit $D/sbin/init