From b0c29c253d88cc6c63d0e10f6f5a1f2914a1da30 Mon Sep 17 00:00:00 2001 From: Koen Kooi Date: Thu, 9 Jun 2011 10:16:49 +0200 Subject: sysvinit: split inittab into it's own recipe Implements the improvements suggested in the original fix for [YOCTO #1131] (From OE-Core rev: e9cde6962d369fb620799d0370ea9dc7d6234d37) Signed-off-by: Signed-off-by: Richard Purdie --- .../sysvinit/sysvinit-inittab_2.88dsf.bb | 58 ++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb (limited to 'meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb') diff --git a/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb new file mode 100644 index 0000000000..9f34b273ce --- /dev/null +++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb @@ -0,0 +1,58 @@ +DESCRIPTION = "Inittab for sysvinit" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://COPYING;md5=751419260aa954499f7abaabaa882bbe" + +PR = "r6" + +SRC_URI = "file://COPYING \ + file://inittab" + +S = "${WORKDIR}/sysvinit-${PV}" + +do_configure() { + cp ${WORKDIR}/COPYING ${S}/ +} + +do_compile() { + : +} + +do_install() { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab + if [ ! -z "${SERIAL_CONSOLE}" ]; then + echo "S:2345:respawn:${base_sbindir}/getty ${SERIAL_CONSOLE}" >> ${D}${sysconfdir}/inittab + fi + if [ "${USE_VT}" = "1" ]; then + cat <>${D}${sysconfdir}/inittab +# ${base_sbindir}/getty invocations for the runlevels. +# +# The "id" field MUST be the same as the last +# characters of the device (after "tty"). +# +# Format: +# ::: +# + +EOF + + for n in ${SYSVINIT_ENABLED_GETTYS} + do + echo "$n:2345:respawn:${base_sbindir}/getty 38400 tty$n" >> ${D}${sysconfdir}/inittab + done + echo "" >> ${D}${sysconfdir}/inittab + fi +} + +# USE_VT and SERIAL_CONSOLE are generally defined by the MACHINE .conf. +# Set PACKAGE_ARCH appropriately. +PACKAGE_ARCH = "${MACHINE_ARCH}" + +FILES_${PN} = "${sysconfdir}/inittab" +CONFFILES_${PN} = "${sysconfdir}/inittab" + +USE_VT ?= "1" +SYSVINIT_ENABLED_GETTYS ?= "1" + + + -- cgit v1.2.3-54-g00ecf