mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: "Andreas Bießmann" <biessmann@corscience.de>
To: PTXdist list <ptxdist@pengutronix.de>
Subject: [ptxdist] [PATCH] ptxd_install_getent_id(): fix search for credentials
Date: Tue, 13 Nov 2012 10:29:19 +0100	[thread overview]
Message-ID: <1352798959-4548-1-git-send-email-biessmann@corscience.de> (raw)

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

             reply	other threads:[~2012-11-13  9:29 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-11-13  9:29 Andreas Bießmann [this message]
2012-11-13 15:26 ` Marc Kleine-Budde
2012-11-13 16:00   ` Andreas Bießmann

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1352798959-4548-1-git-send-email-biessmann@corscience.de \
    --to=biessmann@corscience.de \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox