rpms/fedora-usermgmt/FC-3 fedora-usermgmt-wrapper, 1.1, 1.2 fedora-usermgmt.spec, 1.5, 1.6
Enrico Scholz (ensc)
fedora-extras-commits at redhat.com
Sat Dec 10 11:59:20 UTC 2005
Author: ensc
Update of /cvs/extras/rpms/fedora-usermgmt/FC-3
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv29993/FC-3
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/FC-3/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:18 -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/FC-3/fedora-usermgmt.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- fedora-usermgmt.spec 10 Dec 2004 22:03:02 -0000 1.5
+++ fedora-usermgmt.spec 10 Dec 2005 11:59:18 -0000 1.6
@@ -6,13 +6,13 @@
Summary: Fedora tools for user management
Name: fedora-usermgmt
-Version: 0.7
-Release: 2
-Epoch: 0
+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)
@@ -40,7 +40,7 @@
Source20: fedora-usermgmt-groupadd.legacy
Source21: fedora-usermgmt-useradd.legacy
Provides: instance(fedora-usermgmt)
-Requires: %name = %epoch:%version-%release
+Requires: %name = %version-%release
Requires(pre): %confdir
Requires(postun): %confdir
Requires(post): %alternatives
@@ -145,6 +145,13 @@
%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
+- removed epoch
+
* Sat Mar 20 2004 Enrico Scholz <enrico.scholz at informatik.tu-chemnitz.de> - 0:0.7-0.fdr.2
- applied patch from https://bugzilla.fedora.us/show_bug.cgi?id=701#c10
I should not defer such things but apply them immediatly...
More information about the scm-commits
mailing list