diff options
author | tprrt <tprrt@tupi.fr> | 2015-04-14 00:08:03 +0200 |
---|---|---|
committer | Richard Purdie <richard.purdie@linuxfoundation.org> | 2015-04-24 11:05:58 +0100 |
commit | 09ac2664fba223111c20c3000af6b8d5cdaabeb1 (patch) | |
tree | 92af6acf7f83c6267cb963a3b396204b45a77fa8 /meta/classes | |
parent | ae4d605d802edb4c8bdb2dbee1b0c36d7730c07f (diff) | |
download | openembedded-core-09ac2664fba223111c20c3000af6b8d5cdaabeb1.tar.gz openembedded-core-09ac2664fba223111c20c3000af6b8d5cdaabeb1.tar.bz2 openembedded-core-09ac2664fba223111c20c3000af6b8d5cdaabeb1.zip |
image: zap_empty_root_password doesn't handle passwd file in shadow case
/etc/passwd isn't editted if /etc/shadow exists and should be else
it can cause problems with some login providers such as toybox.
Signed-off-by: tprrt <tprrt@tupi.fr>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
Diffstat (limited to 'meta/classes')
-rw-r--r-- | meta/classes/image.bbclass | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/meta/classes/image.bbclass b/meta/classes/image.bbclass index dc9bd80165..01f8b3fc19 100644 --- a/meta/classes/image.bbclass +++ b/meta/classes/image.bbclass @@ -335,7 +335,8 @@ MULTILIB_TEMP_ROOTFS = "${WORKDIR}/multilib" zap_empty_root_password () { if [ -e ${IMAGE_ROOTFS}/etc/shadow ]; then sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/shadow - elif [ -e ${IMAGE_ROOTFS}/etc/passwd ]; then + fi + if [ -e ${IMAGE_ROOTFS}/etc/passwd ]; then sed -i 's%^root::%root:*:%' ${IMAGE_ROOTFS}/etc/passwd fi } |