Files
poky/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb
Marcin Juszkiewicz 6309eea2a8 shadow-securetty: add ARM AMBA serial ports
(From OE-Core rev: 77cc57b88a7377e40361428dba52cf35fb7e9e58)

Signed-off-by: Marcin Juszkiewicz <marcin.juszkiewicz@linaro.org>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
2012-10-24 12:50:46 +01:00

32 lines
1.1 KiB
BlitzBasic

SUMMARY = "Provider of the machine specific securetty file"
DESCRIPTION = "Provider of the machine specific securetty file"
SECTION = "base utils"
LICENSE = "MIT"
LIC_FILES_CHKSUM = "file://${COREBASE}/meta/COPYING.MIT;md5=3da9cfbcb788c80a0384361b4de20420"
INHIBIT_DEFAULT_DEPS = "1"
PR = "r2"
SRC_URI = "file://securetty"
# Since we deduce our arch from ${SERIAL_CONSOLE}
PACKAGE_ARCH = "${MACHINE_ARCH}"
do_install () {
# Ensure we add a suitable securetty file to the package that has
# most common embedded TTYs defined.
if [ ! -z "${SERIAL_CONSOLE}" ]; then
# Our SERIAL_CONSOLE contains a baud rate and sometimes a -L
# option as well. The following pearl :) takes that and converts
# it into newline-separated tty's and appends them into
# securetty. So if a machine has a weird looking console device
# node (e.g. ttyAMA0) that securetty does not know, it will get
# appended to securetty and root logins will be allowed on that
# console.
echo "${SERIAL_CONSOLE}" | sed -e 's/[0-9][0-9]\|\-L//g'|tr "[ ]" "[\n]" >> ${WORKDIR}/securetty
fi
install -d ${D}${sysconfdir}
install -m 0400 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty
}