1 DEPENDS = "virtual/libc"
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}"
12 SRC_URI = "ftp://ftp.cistron.nl/pub/people/miquels/sysvinit/sysvinit-${PV}.tar.gz \
13 cvs://anoncvs:anoncvs@cvs.handhelds.org/cvs;module=apps/update-rc.d \
20 S = "${WORKDIR}/sysvinit-${PV}/src"
22 CFLAGS_prepend = "-D_GNU_SOURCE "
23 export LCRYPT = "-lcrypt"
26 install -d ${D}/${bindir} ${D}/${sbindir} \
27 ${D}/sbin ${D}/${sysconfdir}/default \
28 ${D}/${sysconfdir}/init.d
29 # install -m 755 debian/sysv-rc/sbin/invoke-rc.d \
30 # debian/sysv-rc/sbin/update-rc.d ${D}${sbindir}/
31 install -m 755 halt killall5 \
32 runlevel shutdown ${D}/sbin/
33 install -m 755 init ${D}/sbin/sysvinit
34 install -m 755 mesg last ${D}${bindir}
35 install -m 0755 ${WORKDIR}/need ${D}/sbin/need.sysvinit
36 install -m 0755 ${WORKDIR}/provide ${D}/sbin/provide.sysvinit
37 ln -sf halt ${D}/sbin/reboot
38 ln -sf halt ${D}/sbin/poweroff
39 ln -sf init ${D}/sbin/telinit
40 ln -sf killall5 ${D}/sbin/pidof
41 ln -sf last ${D}${bindir}/lastb
42 # echo "/etc/inittab" > ${D}/CONTROL/conffiles
43 # echo "/etc/default/rcS" >> ${D}/CONTROL/conffiles
44 # install -m 0755 ${FILESDIR}/prerm ${D}/CONTROL/
45 # install -m 0755 ${FILESDIR}/postinst ${D}/CONTROL/
46 oe_machinstall -m 0644 ${WORKDIR}/inittab ${D}/${sysconfdir}/inittab
47 if [ ! -z "${SERIAL_CONSOLE}" ]; then
48 echo "S:2345:respawn:/sbin/getty ${SERIAL_CONSOLE}" >> ${D}/etc/inittab
50 install -m 0644 ${WORKDIR}/rcS-default ${D}/etc/default/rcS
51 install -m 0755 ${WORKDIR}/rc ${D}/etc/init.d
52 install -m 0755 ${WORKDIR}/rcS ${D}/etc/init.d
56 install -m 0755 ${WORKDIR}/update-rc.d/update-rc.d ${STAGING_BINDIR}/
62 # FIXME: use update-alternatives.. but what if the user doesnt have it?
63 # if [ -n "`which update-alternatives 2>/dev/null`" ]; then
64 # update-alternatives blah
66 ln -sf sysvinit $D/sbin/init
73 # FIXME: use update-alternatives