SOURCES: rpm-user_group.sh - invalidate nscd cache after removing ...

glen glen at pld-linux.org
Wed Apr 12 15:58:26 CEST 2006


Author: glen                         Date: Wed Apr 12 13:58:26 2006 GMT
Module: SOURCES                       Tag: HEAD
---- Log message:
- invalidate nscd cache after removing user or group

---- Files affected:
SOURCES:
   rpm-user_group.sh (1.5 -> 1.6) 

---- Diffs:

================================================================
Index: SOURCES/rpm-user_group.sh
diff -u SOURCES/rpm-user_group.sh:1.5 SOURCES/rpm-user_group.sh:1.6
--- SOURCES/rpm-user_group.sh:1.5	Fri Jan 27 15:32:20 2006
+++ SOURCES/rpm-user_group.sh	Wed Apr 12 15:58:21 2006
@@ -51,6 +51,16 @@
 	if testrm $2; then
 		echo "Removing $MODE $2" | `bannercmd "${MODE}del-$2"`
 		/usr/sbin/${MODE}del $2 || :
+		if [ -x /usr/sbin/nscd ]; then
+		case "${MODE}" in
+		user)
+			/usr/sbin/nscd -i passwd
+			;;
+		group)
+			/usr/sbin/nscd -i group
+			;;
+		esac
+		fi
 	fi
 elif [ "$MODE" = "user" -a "$1" = "addtogroup" ]; then
 	USER=$2
================================================================

---- CVS-web:
    http://cvs.pld-linux.org/SOURCES/rpm-user_group.sh?r1=1.5&r2=1.6&f=u



More information about the pld-cvs-commit mailing list