summaryrefslogtreecommitdiffstats
path: root/meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb
diff options
context:
space:
mode:
authorRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-24 14:33:37 +0000
committerRichard Purdie <richard.purdie@linuxfoundation.org>2012-01-25 14:30:56 +0000
commit7c8899662be5623bedaa9a848fafebeafb348cf0 (patch)
tree4445082106fe0ea595ba03616beba45f595be6a1 /meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb
parent6b2cb8280211d2e28ce75d6a107f99a3fa7868ae (diff)
downloadpoky-7c8899662be5623bedaa9a848fafebeafb348cf0.tar.gz
shadow: Split securetty into a separate recipe
The securetty file is machine specific whilst the rest of the shadow recipe is not. Unfortunately making the recipce machine specific is both inefficient and also causes dependency problems since parts of the system such as the useradd code depend upon it and this introduces a machine specific element to sstate checksums which should not be machine specific. To resolve this, this patch separates out the file into a separate recipe meaning the machine specific components are isolated. (From OE-Core rev: 318133b5202632c6957c2aade22b1ef7af929f23) Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
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}