M7350/oe-core/meta-msm/recipes/sysvinit/sysvinit-inittab_2.88dsf.bbappend

52 lines
1.4 KiB
Plaintext
Raw Normal View History

2024-09-09 08:57:42 +00:00
FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}-${PV}:"
2024-09-09 08:52:07 +00:00
2024-09-09 08:57:42 +00:00
SRC_URI += "\
file://inittab \
"
2024-09-09 08:52:07 +00:00
SERIAL_CONSOLE = "115200 console"
2024-09-09 08:57:42 +00:00
USE_VT = "0"
SYSVINIT_ENABLED_GETTYS = ""
2024-09-09 08:52:07 +00:00
do_install() {
2024-09-09 08:57:42 +00:00
install -d ${D}${sysconfdir}
2024-09-09 08:52:07 +00:00
install -m 0644 ${WORKDIR}/inittab ${D}${sysconfdir}/inittab
if [ ! -z "${SERIAL_CONSOLE}" ]; then
echo "S:2345:respawn:${base_sbindir}/getty -L ttyHSL0 ${SERIAL_CONSOLE}" >> ${D}${sysconfdir}/inittab
fi
idx=0
2024-09-09 08:57:42 +00:00
# tmp="${SERIAL_CONSOLES}"
tmp=""
2024-09-09 08:52:07 +00:00
for i in $tmp
do
2024-09-09 08:57:42 +00:00
j=`echo ${i} | sed s/\;/\ /g`
2024-09-09 08:52:07 +00:00
echo "${idx}:2345:respawn:${base_sbindir}/getty ${j}" >> ${D}${sysconfdir}/inittab
2024-09-09 08:57:42 +00:00
idx=`expr $idx + 1`
2024-09-09 08:52:07 +00:00
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:2345:respawn:${base_sbindir}/getty 38400 tty$n" >> ${D}${sysconfdir}/inittab
done
echo "" >> ${D}${sysconfdir}/inittab
fi
2024-09-09 08:57:42 +00:00
# Add services monitor to inittab
echo "" >> ${D}${sysconfdir}/inittab
echo "# Respawn services monitor" >> ${D}${sysconfdir}/inittab
echo "k1:5:respawn:/usr/bin/services_monitor" >> ${D}${sysconfdir}/inittab
2024-09-09 08:52:07 +00:00
}