mirror of
https://git.yoctoproject.org/poky
synced 2026-04-21 21:32:12 +02:00
base-passwd.preinst:fix creating passwd and group error
Create files `passwd' and `group' in `$D${sysconfdir}', if `$D${sysconfdir}'
does not exist, there is an error:
...
cannot create $D${sysconfdir}/passwd: Directory nonexistent
cannot create $D${sysconfdir}/group: Directory nonexistent
...
Attampt to create dir before file creation.
[YOCTO #3917]
(From OE-Core rev: 7912f3a721529302596a032560cffe96297b3113)
Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
Signed-off-by: Saul Wold <sgw@linux.intel.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
This commit is contained in:
committed by
Richard Purdie
parent
966a7cbe96
commit
8b87cb519e
@@ -1,7 +1,7 @@
|
||||
SUMMARY = "Base system master password/group files."
|
||||
DESCRIPTION = "The master copies of the user database files (/etc/passwd and /etc/group). The update-passwd tool is also provided to keep the system databases synchronized with these master files."
|
||||
SECTION = "base"
|
||||
PR = "r0"
|
||||
PR = "r1"
|
||||
LICENSE = "GPLv2+"
|
||||
LIC_FILES_CHKSUM = "file://COPYING;md5=eb723b61539feef013de476e68b5c50a"
|
||||
|
||||
@@ -64,6 +64,7 @@ python populate_packages_prepend() {
|
||||
f.close()
|
||||
|
||||
preinst = """#!/bin/sh
|
||||
mkdir -p $D${sysconfdir}
|
||||
if [ ! -e $D${sysconfdir}/passwd ]; then
|
||||
\tcat << EOF > $D${sysconfdir}/passwd
|
||||
""" + passwd + """EOF
|
||||
|
||||
Reference in New Issue
Block a user