aboutsummaryrefslogtreecommitdiffstats
path: root/recipes
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2010-03-22 01:06:56 +0000
committerMarcin Juszkiewicz <marcin@buglabs.net>2010-03-23 10:57:44 +0100
commit292da7e055c048d7f6698404f02718f853ddca18 (patch)
tree2293e2d6acaac87e1750fec4e76d19c367dcf31a /recipes
parentcf30863b6dbdb7a8bb3920fc97f169f217e93682 (diff)
downloadopenembedded-292da7e055c048d7f6698404f02718f853ddca18.tar.gz
shadow: use u-a on binaries that conflict with util-linux-ng
Acked-by: <koen@openembedded.org> Acked-by: Philip Balister <philip@balister.org>
Diffstat (limited to 'recipes')
-rw-r--r--recipes/shadow/shadow.inc27
1 files changed, 21 insertions, 6 deletions
diff --git a/recipes/shadow/shadow.inc b/recipes/shadow/shadow.inc
index 5e3d2f22ba..30bd92f394 100644
--- a/recipes/shadow/shadow.inc
+++ b/recipes/shadow/shadow.inc
@@ -11,7 +11,7 @@ LICENSE = "BSD"
SECTION = "base"
DEPENDS += "${@base_contains('DISTRO_FEATURES', 'pam', 'libpam', '', d)}"
-INC_PR = "r10"
+INC_PR = "r13"
# Additional Policy files for PAM
PAM_SRC_URI = " \
@@ -79,16 +79,30 @@ do_install_append() {
sed -i 's/MAIL_DIR/#MAIL_DIR/g' ${D}${sysconfdir}/login.defs
sed -i 's/#MAIL_FILE/MAIL_FILE/g' ${D}${sysconfdir}/login.defs
- mv ${D}${bindir}/passwd ${D}${bindir}/passwd.${PN}
+ install -d ${D}${sbindir} ${D}${base_sbindir} ${D}${base_bindir}
+ for i in passwd chfn newgrp chsh ; do
+ mv ${D}${bindir}/$i ${D}${bindir}/$i.${PN}
+ done
+
mv ${D}${sbindir}/chpasswd ${D}${sbindir}/chpasswd.${PN}
+ mv ${D}${sbindir}/vigr ${D}${base_sbindir}/vigr.${PN}
+ mv ${D}${sbindir}/vipw ${D}${base_sbindir}/vipw.${PN}
+ mv ${D}${bindir}/login ${D}${base_bindir}/login.${PN}
# Ensure we add a suitable securetty file to the package that has most common embedded TTYs defined.
install -m 0400 ${WORKDIR}/securetty ${D}${sysconfdir}/securetty
+
}
pkg_postinst_${PN} () {
- update-alternatives --install ${bindir}/passwd passwd passwd.${PN} 100
- update-alternatives --install ${sbindir}/chpasswd chpasswd chpasswd.${PN} 100
+ update-alternatives --install ${bindir}/passwd passwd passwd.${PN} 200
+ update-alternatives --install ${sbindir}/chpasswd chpasswd chpasswd.${PN} 200
+ update-alternatives --install ${bindir}/chfn chfn chfn.${PN} 200
+ update-alternatives --install ${bindir}/newgrp newgrp newgrp.${PN} 200
+ update-alternatives --install ${bindir}/chsh chsh chsh.${PN} 200
+ update-alternatives --install ${base_bindir}/login login login.${PN} 200
+ update-alternatives --install ${base_sbindir}/vipw vipw vipw.${PN} 200
+ update-alternatives --install ${base_sbindir}/vigr vigr vigr.${PN} 200
if [ "x$D" != "x" ]; then
exit 1
fi
@@ -97,6 +111,7 @@ pkg_postinst_${PN} () {
}
pkg_prerm_${PN} () {
- update-alternatives --remove passwd passwd.${PN}
- update-alternatives --remove chpasswd chpasswd.${PN}
+ for i in passwd chpasswd chfn newgrp chsh login vipw vigr ; do
+ update-alternatives --remove $i $i.${PN}
+ done
}