diff options
author | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-01-24 14:33:37 +0000 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2012-01-25 14:30:56 +0000 |
commit | 7c8899662be5623bedaa9a848fafebeafb348cf0 (patch) | |
tree | 4445082106fe0ea595ba03616beba45f595be6a1 /meta/recipes-extended/shadow/shadow-securetty_4.1.4.3.bb | |
parent | 6b2cb8280211d2e28ce75d6a107f99a3fa7868ae (diff) | |
download | poky-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.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 | } | ||