diff options
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.bb | 29 |
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 @@ | |||
1 | SUMMARY = "Provider of the machine specific securetty file" | ||
2 | DESCRIPTION = "Provider of the machine specific securetty file" | ||
3 | SECTION = "base utils" | ||
4 | LICENSE = "MIT" | ||
5 | LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420" | ||
6 | |||
7 | INHIBIT_DEFAULT_DEPS = "1" | ||
8 | |||
9 | SRC_URI = "file://securetty" | ||
10 | |||
11 | # Since we deduce our arch from ${SERIAL_CONSOLE} | ||
12 | PACKAGE_ARCH = "${MACHINE_ARCH}" | ||
13 | |||
14 | do_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 | } | ||