summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb
diff options
context:
space:
mode:
Diffstat (limited to 'meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb')
-rw-r--r--meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb29
1 files changed, 29 insertions, 0 deletions
diff --git a/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb
new file mode 100644
index 0000000000..e391d24933
--- /dev/null
+++ b/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb
@@ -0,0 +1,29 @@
1SUMMARY = "Provider of the machine specific securetty file"
2DESCRIPTION = "Provider of the machine specific securetty file"
3SECTION = "base utils"
4LICENSE = "MIT"
5LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
6
7INHIBIT_DEFAULT_DEPS = "1"
8
9SRC_URI = "file://securetty"
10
11# Since we deduce our arch from ${SERIAL_CONSOLE}
12PACKAGE_ARCH = "${MACHINE_ARCH}"
13
14do_install () {
15 # Ensure we add a suitable securetty file to the package that has
16 # most common embedded TTYs defined.
17 if [ ! -z "${SERIAL_CONSOLE}" ]; then
18 # Our SERIAL_CONSOLE contains a baud rate and sometimes a -L
19 # option as well. The following pearl :) takes that and converts
20 # it into newline-separated tty's and appends them into
21 # securetty. So if a machine has a weird looking console device
22 # node (e.g. ttyAMA0) that securetty does not know, it will get
23 # appended to securetty and root logins will be allowed on that
24 # console.
25 echo "${SERIAL_CONSOLE}" | sed -e 's/[0-9][0-9]\|\-L//g'|tr "[ ]" "[\n]" >> ${WORKDIR}/securetty
26 fi
27 install -d ${D}${sysconfdir}
28 install -m 0400 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty
29}