diff options
-rw-r--r-- | meta/recipes-core/base-passwd/base-passwd_3.5.29.bb | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb index 10457b2decc..b7bed2ff41e 100644 --- a/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb +++ b/meta/recipes-core/base-passwd/base-passwd_3.5.29.bb @@ -57,9 +57,13 @@ base_passwd_sstate_postinst() { # them to make sure they are atomically install. install -d -m 755 ${STAGING_DIR_TARGET}${sysconfdir} for i in passwd group; do - install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/$i.master \ - ${STAGING_DIR_TARGET}${sysconfdir}/ - mv ${STAGING_DIR_TARGET}${sysconfdir}/$i.master ${STAGING_DIR_TARGET}${sysconfdir}/$i + # Copy the ${sysconfdir} files only the first time, so we do not overwrite + # users/group created by useradd recipes + if [ ! -e ${STAGING_DIR_TARGET}${sysconfdir}/$i ]; then + install -p -m 644 ${STAGING_DIR_TARGET}${datadir}/base-passwd/$i.master \ + ${STAGING_DIR_TARGET}${sysconfdir}/ + mv ${STAGING_DIR_TARGET}${sysconfdir}/$i.master ${STAGING_DIR_TARGET}${sysconfdir}/$i + fi done fi } |