From fda7fd703dc08d2b0dbbc20692bd44c212591958 Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Tue, 11 Jun 2002 14:58:06 +0000 Subject: [PATCH] fix determination of building user/group (think about Solaris and su) --- inn/inn.spec | 12 +++--------- 1 file changed, 3 insertions(+), 9 deletions(-) diff --git a/inn/inn.spec b/inn/inn.spec index e574480e2c..3a291aede0 100644 --- a/inn/inn.spec +++ b/inn/inn.spec @@ -33,7 +33,7 @@ Distribution: OpenPKG [REL] Group: News License: ISC Version: 2.3.3 -Release: 20020508 +Release: 20020611 # list of sources Source0: ftp://ftp.isc.org/isc/inn/inn-%{version}.tar.gz @@ -121,14 +121,8 @@ AutoReqProv: no cd inn-%{version} # determine current user and group - thisuser=`(id -un) 2>/dev/null ||\ - (whoami) 2>/dev/null ||\ - (who am i | cut "-d " -f1) 2>/dev/null ||\ - echo $LOGNAME` - thisgroup=`(cat /etc/passwd; ypcat passwd) 2>/dev/null |\ - grep "^${thisuser}:" | awk -F: '{ print $4; }' | head -1` - thisgroup=`(cat /etc/group; ypcat group) 2>/dev/null |\ - grep ":${thisgroup}:" | awk -F: '{ print $1; }' | head -1` + thisuser=`%{l_shtool} echo -e '%u'` + thisgroup=`%{l_shtool} echo -e '%g'` if [ ".$thisgroup" = . ]; then thisgroup="$thisuser" fi