]> code.ossystems Code Review - openembedded-core.git/commitdiff
shadow: Generate the shadow files at rootfs construction
authorMark Hatle <mark.hatle@windriver.com>
Wed, 9 Nov 2011 23:02:43 +0000 (17:02 -0600)
committerSaul Wold <sgw@linux.intel.com>
Fri, 11 Nov 2011 08:33:50 +0000 (00:33 -0800)
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 <mark.hatle@windriver.com>
meta/recipes-extended/shadow/shadow_4.1.4.3.bb

index 5bc4a6183eb6fcd295683737b675ee816696b12e..25330a4cef60f77ed7101ed51657818dc18b9df3 100644 (file)
@@ -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} () {