diff options
| -rw-r--r-- | meta/classes/useradd.bbclass | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/meta/classes/useradd.bbclass b/meta/classes/useradd.bbclass index 0b9a843b24..e443f845f7 100644 --- a/meta/classes/useradd.bbclass +++ b/meta/classes/useradd.bbclass | |||
| @@ -24,6 +24,16 @@ if test "x$D" != "x"; then | |||
| 24 | # Installing into a sysroot | 24 | # Installing into a sysroot |
| 25 | SYSROOT="$D" | 25 | SYSROOT="$D" |
| 26 | OPT="--root $D" | 26 | OPT="--root $D" |
| 27 | |||
| 28 | # Make sure login.defs is there, this is to make debian package backend work | ||
| 29 | # correctly while doing rootfs. | ||
| 30 | # The problem here is that if /etc/login.defs is treated as a config file for | ||
| 31 | # shadow package, then while performing preinsts for packages that depend on | ||
| 32 | # shadow, there might only be /etc/login.def.dpkg-new there in root filesystem. | ||
| 33 | if [ ! -e $D${sysconfdir}/login.defs -a -e $D${sysconfdir}/login.defs.dpkg-new ]; then | ||
| 34 | cp $D${sysconfdir}/login.defs.dpkg-new $D${sysconfdir}/login.defs | ||
| 35 | fi | ||
| 36 | |||
| 27 | # user/group lookups should match useradd/groupadd --root | 37 | # user/group lookups should match useradd/groupadd --root |
| 28 | export PSEUDO_PASSWD="$SYSROOT:${STAGING_DIR_NATIVE}" | 38 | export PSEUDO_PASSWD="$SYSROOT:${STAGING_DIR_NATIVE}" |
| 29 | fi | 39 | fi |
