summaryrefslogtreecommitdiffstats
path: root/meta/recipes-core/busybox/busybox-inittab_1.36.1.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-core/busybox/busybox-inittab_1.36.1.bb')
-rw-r--r--meta/recipes-core/busybox/busybox-inittab_1.36.1.bb63
1 files changed, 63 insertions, 0 deletions
diff --git a/meta/recipes-core/busybox/busybox-inittab_1.36.1.bb b/meta/recipes-core/busybox/busybox-inittab_1.36.1.bb
new file mode 100644
index 0000000000..1f179d8560
--- /dev/null
+++ b/meta/recipes-core/busybox/busybox-inittab_1.36.1.bb
@@ -0,0 +1,63 @@
1SUMMARY = "inittab configuration for BusyBox"
2LICENSE = "GPL-2.0-only"
3LIC_FILES_CHKSUM = "file://${COREBASE}/meta/files/common-licenses/GPL-2.0-only;md5=801f80980d171dd6425610833a22dbe6"
4
5SRC_URI = "file://inittab"
6
7S = "${WORKDIR}"
8
9INHIBIT_DEFAULT_DEPS = "1"
10
11do_compile() {
12 :
13}
14
15do_install() {
16 install -d ${D}${sysconfdir}
17 install -D -m 0644 ${S}/inittab ${D}${sysconfdir}/inittab
18
19 CONSOLES="${SERIAL_CONSOLES}"
20 for s in $CONSOLES
21 do
22 speed=$(echo $s | cut -d\; -f 1)
23 device=$(echo $s | cut -d\; -f 2)
24 label=$(echo $device | sed -e 's/tty//' | tail --bytes=5)
25
26 echo "$device::respawn:${sbindir}/ttyrun $device ${base_sbindir}/getty $speed $device" >> ${D}${sysconfdir}/inittab
27 done
28
29 if [ "${USE_VT}" = "1" ]; then
30 cat <<EOF >>${D}${sysconfdir}/inittab
31# ${base_sbindir}/getty invocations for the runlevels.
32#
33# The "id" field MUST be the same as the last
34# characters of the device (after "tty").
35#
36# Format:
37# <id>:<runlevels>:<action>:<process>
38#
39
40EOF
41
42 for n in ${SYSVINIT_ENABLED_GETTYS}
43 do
44 echo "tty$n:12345:respawn:${base_sbindir}/getty 38400 tty$n" >> ${D}${sysconfdir}/inittab
45 done
46 echo "" >> ${D}${sysconfdir}/inittab
47 fi
48
49}
50
51
52# SERIAL_CONSOLES is generally defined by the MACHINE .conf.
53# Set PACKAGE_ARCH appropriately.
54PACKAGE_ARCH = "${MACHINE_ARCH}"
55
56FILES:${PN} = "${sysconfdir}/inittab"
57CONFFILES:${PN} = "${sysconfdir}/inittab"
58
59RDEPENDS:${PN} = "ttyrun"
60RCONFLICTS:${PN} = "sysvinit-inittab"
61
62USE_VT ?= "1"
63SYSVINIT_ENABLED_GETTYS ?= "1"