From c527fd1f14c27855a37f2e8ac5346ce8d940ced2 Mon Sep 17 00:00:00 2001 From: Tudor Florea Date: Thu, 16 Oct 2014 03:05:19 +0200 Subject: initial commit for Enea Linux 4.0-140929 Migrated from the internal git server on the daisy-enea-point-release branch Signed-off-by: Tudor Florea --- .../sysvinit/sysvinit-inittab_2.88dsf.bb | 82 ++++++++++++++++++++++ 1 file changed, 82 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..30641dac88 --- /dev/null +++ b/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb @@ -0,0 +1,82 @@ +SUMMARY = "Inittab configuration for SysVinit" +LICENSE = "GPLv2" +LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0;md5=801f80980d171dd6425610833a22dbe6" + +PR = "r10" + +SRC_URI = "file://inittab" + +S = "${WORKDIR}/sysvinit-${PV}" + +INHIBIT_DEFAULT_DEPS = "1" + +do_compile() { + : +} + +do_install() { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab + + tmp="${SERIAL_CONSOLES}" + for i in $tmp + do + j=`echo ${i} | sed s/\;/\ /g` + label=`echo ${i} | sed -e 's/^.*;tty//' -e 's/;.*//'` + echo "$label:12345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab + done + + 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 +} + +pkg_postinst_${PN} () { +# run this on the target +if [ "x$D" = "x" ] && [ -e /proc/consoles ]; then + tmp="${SERIAL_CONSOLES_CHECK}" + for i in $tmp + do + j=`echo ${i} | sed s/^.*\;//g` + if [ -z "`cat /proc/consoles | grep ${j}`" ]; then + sed -i /^.*${j}$/d /etc/inittab + fi + done + kill -HUP 1 +else + if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then + exit 0 + else + exit 1 + fi +fi +} + +# USE_VT and SERIAL_CONSOLES 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