Merge commit 'opendreambox/opendreambox-1.6' into vuplus-1.6
[vuplus_openembedded] / recipes / miniinit / miniinit.bb
1 DESCRIPTION = "minimal init."
2 SECTION = "base"
3 LICENSE = "GPL"
4
5 # SERIAL_CONSOLE is generally defined by the MACHINE .conf.
6 # Set PACKAGE_ARCH appropriately.
7 PACKAGE_ARCH_${PN} = "${MACHINE_ARCH}"
8
9 SRC_URI = "file://rcS file://inittab"
10
11 do_install() {
12         install -d ${D}${sysconfdir} \
13                    ${D}${sysconfdir}/rcS.d \
14                    ${D}${sysconfdir}/rc2.d \
15                    ${D}${sysconfdir}/init.d
16
17         install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
18         install -m 0755 ${WORKDIR}/rcS ${D}${sysconfdir}/init.d
19
20         if [ ! -z "${SERIAL_CONSOLE}" ]; then
21                 echo "${SERIAL_CONSOLE}::askfirst:/bin/sh --login" >> ${D}${sysconfdir}/inittab
22         fi
23 }