|
|
@@ -39,8 +39,8 @@
|
|
|
# o any cc(1)
|
|
|
|
|
|
# the package version and release
|
|
|
-%define V_openpkg 20030221
|
|
|
-%define R_openpkg 20030221
|
|
|
+%define V_openpkg 20030222
|
|
|
+%define R_openpkg 20030222
|
|
|
|
|
|
# the used software versions
|
|
|
%define V_rpm 4.0.2
|
|
|
@@ -881,7 +881,7 @@ Provides: OpenPKG
|
|
|
eval "xuid=\"\$${class}uid\""
|
|
|
eval "xgid=\"\$${class}gid\""
|
|
|
if [ ".$xuid" = . ]; then
|
|
|
- xuid=`(cat /etc/passwd; ypcat passwd) 2>/dev/null |\
|
|
|
+ xuid=`(getent passwd; cat /etc/passwd; ypcat passwd) 2>/dev/null |\
|
|
|
grep "^${xusr}:" | awk -F: '{ print $3; }'`
|
|
|
if [ ".$xuid" = . ]; then
|
|
|
# seek for a reasonably uid/gid pair
|
|
|
@@ -890,11 +890,11 @@ Provides: OpenPKG
|
|
|
while [ ".$ok" = .0 ]; do
|
|
|
eval "u_exists=\$u_exists_$xuid"
|
|
|
if [ ".$u_exists" = . ]; then
|
|
|
- u_exists=`(cat /etc/passwd; ypcat passwd) 2>/dev/null | grep "^[^:]*:[^:]*:$xuid:"`
|
|
|
+ u_exists=`(getent passwd; cat /etc/passwd; ypcat passwd) 2>/dev/null | grep "^[^:]*:[^:]*:$xuid:"`
|
|
|
fi
|
|
|
eval "g_exists=\$g_exists_$xuid"
|
|
|
if [ ".$g_exists" = . ]; then
|
|
|
- g_exists=`(cat /etc/group; ypcat group) 2>/dev/null | grep "^[^:]*:[^:]*:$xuid:"`
|
|
|
+ g_exists=`(getent group; cat /etc/group; ypcat group) 2>/dev/null | grep "^[^:]*:[^:]*:$xuid:"`
|
|
|
fi
|
|
|
if [ ".$u_exists" = . -a ".$g_exists" = . ]; then
|
|
|
ok=1
|
|
|
@@ -907,7 +907,7 @@ Provides: OpenPKG
|
|
|
fi
|
|
|
fi
|
|
|
if [ ".$xgid" = . ]; then
|
|
|
- xgid=`(cat /etc/group; ypcat group) 2>/dev/null |\
|
|
|
+ xgid=`(getent group; cat /etc/group; ypcat group) 2>/dev/null |\
|
|
|
grep "^${xgrp}:" | awk -F: '{ print $3; }'`
|
|
|
if [ ".$xgid" = . ]; then
|
|
|
xgid="$xuid"
|
|
|
@@ -944,7 +944,7 @@ Provides: OpenPKG
|
|
|
class="$1"; usr="$2"; uid="$3"; grp="$4"; gid="$5"
|
|
|
|
|
|
# check whether user already exists
|
|
|
- exists=`(cat /etc/passwd; ypcat passwd) 2>/dev/null | grep "^$usr:"`
|
|
|
+ exists=`(getent passwd; cat /etc/passwd; ypcat passwd) 2>/dev/null | grep "^$usr:"`
|
|
|
if [ ".$exists" = . ]; then
|
|
|
if [ ".$cusr" != ".root" ]; then
|
|
|
echo "openpkg:WARNING: skipping creation of OpenPKG $class user $usr" 1>&2
|
|
|
@@ -987,7 +987,7 @@ Provides: OpenPKG
|
|
|
fi
|
|
|
|
|
|
# check whether group already exists
|
|
|
- exists=`(cat /etc/group; ypcat group) 2>/dev/null | grep "^$grp:"`
|
|
|
+ exists=`(getent group; cat /etc/group; ypcat group) 2>/dev/null | grep "^$grp:"`
|
|
|
if [ ".$exists" = . ]; then
|
|
|
if [ ".$cusr" != ".root" ]; then
|
|
|
echo "openpkg:WARNING: skipping creation of OpenPKG $class group $grp" 1>&2
|
|
|
@@ -1312,7 +1312,7 @@ Provides: OpenPKG
|
|
|
class="$1"; usr="$2"; uid="$3"; grp="$4"; gid="$5"
|
|
|
|
|
|
# check whether user already exists
|
|
|
- exists=`(cat /etc/passwd; ypcat passwd) 2>/dev/null | grep "^$usr:"`
|
|
|
+ exists=`(getent passwd; cat /etc/passwd; ypcat passwd) 2>/dev/null | grep "^$usr:"`
|
|
|
if [ ".$exists" != . ]; then
|
|
|
if [ ".$cusr" != ".root" ]; then
|
|
|
echo "openpkg:WARNING: skipping deletion of OpenPKG $class user $usr" 1>&2
|
|
|
@@ -1346,7 +1346,7 @@ Provides: OpenPKG
|
|
|
fi
|
|
|
|
|
|
# check whether group already exists
|
|
|
- exists=`(cat /etc/group; ypcat group) 2>/dev/null | grep "^$grp:"`
|
|
|
+ exists=`(getent group; cat /etc/group; ypcat group) 2>/dev/null | grep "^$grp:"`
|
|
|
if [ ".$exists" = . ]; then
|
|
|
if [ ".$cusr" != ".root" ]; then
|
|
|
echo "openpkg:WARNING: skipping deletion of OpenPKG $class group $grp" 1>&2
|