mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH] ptxd_install_getent_id(): fix search for credentials
@ 2012-11-13  9:29 Andreas Bießmann
  2012-11-13 15:26 ` Marc Kleine-Budde
  0 siblings, 1 reply; 3+ messages in thread
From: Andreas Bießmann @ 2012-11-13  9:29 UTC (permalink / raw)
  To: PTXdist list

Before the search for alternative location of the 'db' to lookup the number
for a given user/group-name was only searched in ${prefix} projectroot which
is mostly available in a project. However the ${prefix} for installed ptxdist
is 'generic'.
Check this additional prefix to prevent errors when no local /etc/passwd or
/etc/group is available to use the generic version provbided by ptxdist.

Signed-off-by: Andreas Bießmann <biessmann@corscience.de>
---
 scripts/lib/ptxd_make_xpkg_pkg.sh |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/scripts/lib/ptxd_make_xpkg_pkg.sh b/scripts/lib/ptxd_make_xpkg_pkg.sh
index 476ad58..8dd850c 100644
--- a/scripts/lib/ptxd_make_xpkg_pkg.sh
+++ b/scripts/lib/ptxd_make_xpkg_pkg.sh
@@ -48,7 +48,8 @@ ptxd_install_getent_id() {
 
     eval ${key}_name='\(${!key}\)'
 
-    if ! ptxd_get_alternative "projectroot" "${db}"; then
+    if ! ptxd_get_alternative "projectroot" "${db}" -o \
+        ! ptxd_get_alternative "generic" "${db}" ; then
 	ptxd_bailout "
 
   Unable to find '${db}'.
-- 
1.7.10.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2012-11-13 16:00 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-13  9:29 [ptxdist] [PATCH] ptxd_install_getent_id(): fix search for credentials Andreas Bießmann
2012-11-13 15:26 ` Marc Kleine-Budde
2012-11-13 16:00   ` Andreas Bießmann

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox