|
|
@@ -39,8 +39,8 @@
|
|
|
# o any cc(1)
|
|
|
|
|
|
# the package version and release
|
|
|
-%define V_openpkg 20030301
|
|
|
-%define R_openpkg 20030301
|
|
|
+%define V_openpkg 20030305
|
|
|
+%define R_openpkg 20030305
|
|
|
|
|
|
# the used software versions
|
|
|
%define V_rpm 4.0.2
|
|
|
@@ -847,7 +847,7 @@ Provides: OpenPKG
|
|
|
|
|
|
%pre
|
|
|
# always performed for upgrades and because it doesn't harm!
|
|
|
- #[ ".$1" != .1 ] && exit 0
|
|
|
+ # [ ".$1" != .1 ] && exit 0
|
|
|
|
|
|
# this procedure is only usable with root privileges
|
|
|
# (for non-root installations it is not required at all)
|
|
|
@@ -939,11 +939,11 @@ Provides: OpenPKG
|
|
|
"management:${musr}:${muid}:${mgrp}:${mgid}" \
|
|
|
"restricted:${rusr}:${ruid}:${rgrp}:${rgid}" \
|
|
|
"non-privileged:${nusr}:${nuid}:${ngrp}:${ngid}"; do
|
|
|
- # split request into class/usr/uid/grp/gid
|
|
|
+ # split request into class/usr/uid/grp/gid
|
|
|
OIFS="$IFS"; IFS=":"; set -- $req; IFS="$OIFS"
|
|
|
class="$1"; usr="$2"; uid="$3"; grp="$4"; gid="$5"
|
|
|
|
|
|
- # check whether user already exists
|
|
|
+ # check whether user already exists
|
|
|
exists=`(getent passwd; cat /etc/passwd; ypcat passwd) 2>/dev/null | grep "^$usr:"`
|
|
|
if [ ".$exists" = . ]; then
|
|
|
if [ ".$cusr" != ".root" ]; then
|
|
|
@@ -986,7 +986,7 @@ Provides: OpenPKG
|
|
|
fi
|
|
|
fi
|
|
|
|
|
|
- # check whether group already exists
|
|
|
+ # check whether group already exists
|
|
|
exists=`(getent group; cat /etc/group; ypcat group) 2>/dev/null | grep "^$grp:"`
|
|
|
if [ ".$exists" = . ]; then
|
|
|
if [ ".$cusr" != ".root" ]; then
|
|
|
@@ -1071,8 +1071,8 @@ Provides: OpenPKG
|
|
|
fi
|
|
|
;;
|
|
|
Linux/* )
|
|
|
- # sroot: script root directory
|
|
|
- # lroot: link root directory
|
|
|
+ # sroot: script root directory
|
|
|
+ # lroot: link root directory
|
|
|
if [ -f /etc/debian_version ]; then
|
|
|
sroot=/etc/init.d
|
|
|
lroot=/etc/rc%d.d
|
|
|
@@ -1258,18 +1258,16 @@ Provides: OpenPKG
|
|
|
rm -rf %{l_prefix}/RPM/PKG/* >/dev/null 2>&1 || true
|
|
|
rm -rf %{l_prefix}/RPM/DB/* >/dev/null 2>&1 || true
|
|
|
|
|
|
- ##
|
|
|
- ## The following code usually would be done in a %postun section.
|
|
|
- ## But because we already had to remove the database in this %preun
|
|
|
- ## section (see the 'rm' commands above) in order to make RPM happy
|
|
|
- ## inside its own removal procedure, RPM would no longer find the
|
|
|
- ## %postun script (because it's recorded in the database files). So
|
|
|
- ## we have to perform the procedure already in this %preun script.
|
|
|
- ## except for the removal of the top-level directory it does not
|
|
|
- ## matter. But the top-level directory can only be removed after
|
|
|
- ## the RPM removal procedure took place, so we play a little delay
|
|
|
- ## trick below.
|
|
|
- ##
|
|
|
+ # The following code usually would be done in a %postun section.
|
|
|
+ # But because we already had to remove the database in this %preun
|
|
|
+ # section (see the 'rm' commands above) in order to make RPM happy
|
|
|
+ # inside its own removal procedure, RPM would no longer find the
|
|
|
+ # %postun script (because it's recorded in the database files). So
|
|
|
+ # we have to perform the procedure already in this %preun script.
|
|
|
+ # except for the removal of the top-level directory it does not
|
|
|
+ # matter. But the top-level directory can only be removed after
|
|
|
+ # the RPM removal procedure took place, so we play a little delay
|
|
|
+ # trick below.
|
|
|
|
|
|
# determine current user
|
|
|
cusr=`(id -un) 2>/dev/null ||\
|
|
|
@@ -1307,11 +1305,11 @@ Provides: OpenPKG
|
|
|
"management:%{l_musr}:%{l_muid}:%{l_mgrp}:%{l_mgid}" \
|
|
|
"restricted:%{l_rusr}:%{l_ruid}:%{l_rgrp}:%{l_rgid}" \
|
|
|
"non-privileged:%{l_nusr}:%{l_nuid}:%{l_ngrp}:%{l_ngid}"; do
|
|
|
- # split request into class/usr/uid/grp/gid
|
|
|
+ # split request into class/usr/uid/grp/gid
|
|
|
OIFS="$IFS"; IFS=":"; set -- $req; IFS="$OIFS"
|
|
|
class="$1"; usr="$2"; uid="$3"; grp="$4"; gid="$5"
|
|
|
|
|
|
- # check whether user already exists
|
|
|
+ # check whether user already exists
|
|
|
exists=`(getent passwd; cat /etc/passwd; ypcat passwd) 2>/dev/null | grep "^$usr:"`
|
|
|
if [ ".$exists" != . ]; then
|
|
|
if [ ".$cusr" != ".root" ]; then
|
|
|
@@ -1345,7 +1343,7 @@ Provides: OpenPKG
|
|
|
fi
|
|
|
fi
|
|
|
|
|
|
- # check whether group already exists
|
|
|
+ # check whether group already exists
|
|
|
exists=`(getent group; cat /etc/group; ypcat group) 2>/dev/null | grep "^$grp:"`
|
|
|
if [ ".$exists" = . ]; then
|
|
|
if [ ".$cusr" != ".root" ]; then
|
|
|
@@ -1376,8 +1374,8 @@ Provides: OpenPKG
|
|
|
rm -f /etc/rc.d/${name} >/dev/null 2>&1
|
|
|
;;
|
|
|
Linux/* )
|
|
|
- # sroot: script root directory
|
|
|
- # lroot: link root directory
|
|
|
+ # sroot: script root directory
|
|
|
+ # lroot: link root directory
|
|
|
if [ -f /etc/debian_version ]; then
|
|
|
sroot=/etc/init.d
|
|
|
lroot=/etc/rc%d.d
|