From patchwork Thu Nov 10 18:30:41 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit Subject: [4/5] shadow: Generate the shadow files at rootfs construction Date: Thu, 10 Nov 2011 18:30:41 -0000 From: Mark Hatle X-Patchwork-Id: 14769 Message-Id: To: With the recent changes to the shadow-native package support "--root", we can now convert the passwd/group files to their shadow forms while doing the rootfs install, instead of waiting to run on the target. Signed-off-by: Mark Hatle --- meta/recipes-extended/shadow/shadow_4.1.4.3.bb | 12 +++++++----- 1 files changed, 7 insertions(+), 5 deletions(-) diff --git a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb index 5bc4a61..25330a4 100644 --- a/meta/recipes-extended/shadow/shadow_4.1.4.3.bb +++ b/meta/recipes-extended/shadow/shadow_4.1.4.3.bb @@ -9,7 +9,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=08c553a87d4e51bbed50b20e0adcaede \ DEPENDS = "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}" RDEPENDS_${PN} = "${@base_contains('DISTRO_FEATURES', 'pam', '${PAM_PLUGINS}', '', d)}" -PR = "r4" +PR = "r5" SRC_URI = "http://pkg-shadow.alioth.debian.org/releases/${BPN}-${PV}.tar.bz2 \ file://login_defs_pam.sed \ @@ -128,11 +128,13 @@ pkg_postinst_${PN} () { update-alternatives --install ${base_sbindir}/vigr vigr vigr.${PN} 200 if [ "x$D" != "x" ]; then - exit 1 - fi + rootarg="--root=$D" + else + rootarg="" + fi - pwconv - grpconv + pwconv $rootarg + grpconv $rootarg } pkg_prerm_${PN} () {