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)."
8 PACKAGES = "sysvinit sysv-rc"
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"
14 S = "${WORKDIR}/sysvinit-${PV}/src"
16 CFLAGS_prepend = "-D_GNU_SOURCE "
17 export LCRYPT = "-lcrypt"
20 install -d ${D}/${bindir} ${D}/${sbindir} \
21 ${D}/sbin ${D}/${sysconfdir}/default \
22 ${D}/${sysconfdir}/init.d
23 # install -m 755 debian/sysv-rc/sbin/invoke-rc.d \
24 # debian/sysv-rc/sbin/update-rc.d ${D}${sbindir}/
25 install -m 755 halt killall5 \
26 runlevel shutdown ${D}/sbin/
27 install -m 755 init ${D}/sbin/sysvinit
28 install -m 755 mesg last ${D}${bindir}
29 install -m 0755 ${FILESDIR}/need ${D}/sbin/need.sysvinit
30 install -m 0755 ${FILESDIR}/provide ${D}/sbin/provide.sysvinit
31 ln -sf halt ${D}/sbin/reboot
32 ln -sf halt ${D}/sbin/poweroff
33 ln -sf init ${D}/sbin/telinit
34 ln -sf killall5 ${D}/sbin/pidof
35 ln -sf last ${D}${bindir}/lastb
36 # echo "/etc/inittab" > ${D}/CONTROL/conffiles
37 # echo "/etc/default/rcS" >> ${D}/CONTROL/conffiles
38 # install -m 0755 ${FILESDIR}/prerm ${D}/CONTROL/
39 # install -m 0755 ${FILESDIR}/postinst ${D}/CONTROL/
40 if [ -e ${FILESDIR}/inittab_${MACHINE} ]; then
41 install -m 0644 ${FILESDIR}/inittab_${MACHINE} ${D}/etc/inittab
43 install -m 0644 ${FILESDIR}/inittab ${D}/etc/inittab
45 install -m 0644 ${FILESDIR}/rcS-default ${D}/etc/default/rcS
46 install -m 0755 ${FILESDIR}/rc ${D}/etc/init.d
47 install -m 0755 ${FILESDIR}/rcS ${D}/etc/init.d
48 install -m 0755 ${WORKDIR}/update-rc.d/update-rc.d ${D}/${sbindir}/
52 install -m 0755 ${WORKDIR}/update-rc.d/update-rc.d ${STAGING_BINDIR}/
58 # FIXME: use update-alternatives.. but what if the user doesnt have it?
59 # if [ -n "`which update-alternatives 2>/dev/null`" ]; then
60 # update-alternatives blah
62 ln -sf sysvinit ${D}/sbin/init
69 # FIXME: use update-alternatives