diff options
author | Dave Cobbley <david.j.cobbley@linux.intel.com> | 2018-08-14 20:05:37 +0300 |
---|---|---|
committer | Brad Bishop <bradleyb@fuzziesquirrel.com> | 2018-08-23 04:26:31 +0300 |
commit | eb8dc40360f0cfef56fb6947cc817a547d6d9bc6 (patch) | |
tree | de291a73dc37168da6370e2cf16c347d1eba9df8 /poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb | |
parent | 9c3cf826d853102535ead04cebc2d6023eff3032 (diff) | |
download | openbmc-eb8dc40360f0cfef56fb6947cc817a547d6d9bc6.tar.xz |
[Subtree] Removing import-layers directory
As part of the move to subtrees, need to bring all the import layers
content to the top level.
Change-Id: I4a163d10898cbc6e11c27f776f60e1a470049d8f
Signed-off-by: Dave Cobbley <david.j.cobbley@linux.intel.com>
Signed-off-by: Brad Bishop <bradleyb@fuzziesquirrel.com>
Diffstat (limited to 'poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb')
-rw-r--r-- | poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb | 93 |
1 files changed, 93 insertions, 0 deletions
diff --git a/poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb b/poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb new file mode 100644 index 0000000000..8585a418ab --- /dev/null +++ b/poky/meta/recipes-core/sysvinit/sysvinit-inittab_2.88dsf.bb @@ -0,0 +1,93 @@ +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 \ + file://start_getty" + +S = "${WORKDIR}" + +INHIBIT_DEFAULT_DEPS = "1" + +do_compile() { + : +} + +do_install() { + install -d ${D}${sysconfdir} + install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab + install -d ${D}${base_bindir} + install -m 0755 ${WORKDIR}/start_getty ${D}${base_bindir}/start_getty + + set -x + tmp="${SERIAL_CONSOLES}" + for i in $tmp + do + j=`echo ${i} | sed s/\;/\ /g` + l=`echo ${i} | sed -e 's/tty//' -e 's/^.*;//' -e 's/;.*//'` + label=`echo $l | sed 's/.*\(....\)/\1/'` + echo "$label:12345:respawn:${base_bindir}/start_getty ${j} vt102" >> ${D}${sysconfdir}/inittab + done + + if [ "${USE_VT}" = "1" ]; then + cat <<EOF >>${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: +# <id>:<runlevels>:<action>:<process> +# + +EOF + + for n in ${SYSVINIT_ENABLED_GETTYS} + do + echo "$n:12345:respawn:${base_sbindir}/getty 38400 tty$n" >> ${D}${sysconfdir}/inittab + done + echo "" >> ${D}${sysconfdir}/inittab + fi +} + +pkg_postinst_${PN} () { +# run this on host and on target +if [ "${SERIAL_CONSOLES_CHECK}" = "" ]; then + exit 0 +fi +} + +pkg_postinst_ontarget_${PN} () { +# run this on the target +if [ -e /proc/consoles ]; then + tmp="${SERIAL_CONSOLES_CHECK}" + for i in $tmp + do + j=`echo ${i} | sed -e s/^.*\;//g -e s/\:.*//g` + k=`echo ${i} | sed s/^.*\://g` + if [ -z "`grep ${j} /proc/consoles`" ]; then + if [ -z "${k}" ] || [ -z "`grep ${k} /proc/consoles`" ] || [ ! -e /dev/${j} ]; then + sed -i -e /^.*${j}\ /d -e /^.*${j}$/d /etc/inittab + fi + fi + done + kill -HUP 1 +else + exit 1 +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 ${base_bindir}/start_getty" +CONFFILES_${PN} = "${sysconfdir}/inittab" + +USE_VT ?= "1" +SYSVINIT_ENABLED_GETTYS ?= "1" + + + |