rpms/fedora-usermgmt/devel fedora-usermgmt-wrapper, 1.1, 1.2 fedora-usermgmt.spec, 1.7, 1.8
Enrico Scholz (ensc)
fedora-extras-commits at redhat.com
Sat Dec 10 11:59:32 UTC 2005
- Previous message: rpms/fedora-usermgmt/FC-4 fedora-usermgmt-wrapper, 1.1, 1.2 fedora-usermgmt.spec, 1.7, 1.8
- Next message: rpms/abcde/devel abcde-2.3.99-conf.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 abcde.spec, 1.7, 1.8 sources, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ensc
Update of /cvs/extras/rpms/fedora-usermgmt/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29993/devel
Modified Files:
fedora-usermgmt-wrapper fedora-usermgmt.spec
Log Message:
- fixed URL metadata (bz #172758)
- execute 'nscd -i ...' before and after creating users/groups; this
should workaround nscd caching problems
- minor cleanups and logging enhancements in the wrapper script
- removed epoch
Index: fedora-usermgmt-wrapper
===================================================================
RCS file: /cvs/extras/rpms/fedora-usermgmt/devel/fedora-usermgmt-wrapper,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- fedora-usermgmt-wrapper 8 Nov 2004 04:16:50 -0000 1.1
+++ fedora-usermgmt-wrapper 10 Dec 2005 11:59:30 -0000 1.2
@@ -18,9 +18,27 @@
#
PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin
-
BASE_DIR=/etc/fedora/usermgmt
+function invalidateCache {
+ local rc=0
+ {
+ # Enforce some nscd activity
+ id root
+ id nscd
+
+ # Clear the caches
+ /usr/sbin/nscd -i group || rc=1
+ /usr/sbin/nscd -i passwd || rc=1
+
+ # Enforce some nscd activity
+ id root
+ id nscd
+ } &>/dev/null
+
+ return $rc
+}
+
test -r "$BASE_DIR/baseuid" && BASE_UID=`cat "$BASE_DIR/baseuid"` || BASE_UID=300
test -r "$BASE_DIR/basegid" && BASE_GID=`cat "$BASE_DIR/basegid"` || BASE_GID=$BASE_UID
@@ -32,8 +50,8 @@
test -x "$i" && { exec_name=$i; break; }
done
-case "$skin" in
- useradd)
+case $skin in
+ (useradd)
test "$1" != "--help" || {
printf $"Usage: %s <UID> <useradd-args>+\n" "$(basename $0)"
exit 0
@@ -48,7 +66,7 @@
shift
set -- "$v" "$@"
;;
- groupadd)
+ (groupadd)
test "$1" != "--help" || {
printf $"Usage: %s <GID> <groupadd-args>+\n" "$(basename $0)"
exit 0
@@ -63,19 +81,27 @@
shift
set -- "$v" "$@"
;;
- *) test "$exec_name" || exec_name=$skin;;
+ (*) test "$exec_name" || exec_name=$skin;;
esac
log="$BASE_DIR/log"
if test -e "$log" -a -L "$log"; then
- echo "`date`: '$exec_name' $*" >>"$BASE_DIR/log"
+ echo "`date` [$$]: '$exec_name' $*" >>"$BASE_DIR/log"
exec 1>>"$BASE_DIR/log"
exec 2>>"$BASE_DIR/log"
fi
-test "$exec_name" || {
+test -n "$exec_name" || {
echo $"Wrapper could not be found; aborting" >&2
exit 1
}
-exec "$exec_name" "$@"
+invalidateCache
+"$exec_name" "$@"
+rc=$?
+invalidateCache && sleep 1
+invalidateCache
+
+test $rc -eq 0 || echo "`date` [$$]: failed with '$rc'" >&2
+
+exit $rc
Index: fedora-usermgmt.spec
===================================================================
RCS file: /cvs/extras/rpms/fedora-usermgmt/devel/fedora-usermgmt.spec,v
retrieving revision 1.7
retrieving revision 1.8
diff -u -r1.7 -r1.8
--- fedora-usermgmt.spec 6 Apr 2005 22:11:37 -0000 1.7
+++ fedora-usermgmt.spec 10 Dec 2005 11:59:30 -0000 1.8
@@ -6,13 +6,13 @@
Summary: Fedora tools for user management
Name: fedora-usermgmt
-Version: 0.7
-Release: 3
+Version: 0.8
+Release: 1
License: GPL
BuildArch: noarch
Group: Applications/System
-URL: http://www.fedora.us/wiki/PackageUserCreation
+URL: http://fedoraproject.org/wiki/PackageUserCreation
Source0: fedora-usermgmt-wrapper
Source1: fedora-usermgmt-README
Requires(pre): instance(fedora-usermgmt)
@@ -113,8 +113,8 @@
%preun shadow-utils
-test "$1" != "0" || %alternatives --remove %name %confdir/scripts.shadow-utils
-test "$1" != "0" || %alternatives --remove %name %confdir/scripts.legacy
+test "$1" != 0 || %alternatives --remove %name %confdir/scripts.shadow-utils
+test "$1" != 0 || %alternatives --remove %name %confdir/scripts.legacy
%clean
@@ -145,6 +145,12 @@
%changelog
+* Sat Dec 10 2005 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0.8-1
+- fixed URL metadata (bz #172758)
+- execute 'nscd -i ...' before and after creating users/groups; this
+ should workaround nscd caching problems
+- minor cleanups and logging enhancements in the wrapper script
+
* Fri Apr 7 2005 Michael Schwendt <mschwendt[AT]users.sf.net>
- rebuilt
- Previous message: rpms/fedora-usermgmt/FC-4 fedora-usermgmt-wrapper, 1.1, 1.2 fedora-usermgmt.spec, 1.7, 1.8
- Next message: rpms/abcde/devel abcde-2.3.99-conf.patch, NONE, 1.1 .cvsignore, 1.6, 1.7 abcde.spec, 1.7, 1.8 sources, 1.6, 1.7
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the scm-commits
mailing list