lists.arthurdejong.org
RSS feed

nss-pam-ldapd commit: r1461 - nss-pam-ldapd/debian

[Date Prev][Date Next] [Thread Prev][Thread Next]

nss-pam-ldapd commit: r1461 - nss-pam-ldapd/debian



Author: arthur
Date: Fri May 13 15:02:32 2011
New Revision: 1461
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?view=rev&revision=1461

Log:
don't unconditionally restart nscd but just try to invalidate the cache for the 
maps that change

Modified:
   nss-pam-ldapd/debian/libnss-ldapd.postinst

Modified: nss-pam-ldapd/debian/libnss-ldapd.postinst
==============================================================================
--- nss-pam-ldapd/debian/libnss-ldapd.postinst  Fri May 13 15:01:34 2011        
(r1460)
+++ nss-pam-ldapd/debian/libnss-ldapd.postinst  Fri May 13 15:02:32 2011        
(r1461)
@@ -22,6 +22,8 @@
       # append a new line
       printf '%-15s ldap\n' $name':' >> /etc/nsswitch.conf
     fi
+    # invalidate nscd cache
+    nscd -i "$name" > /dev/null 2>&1 || true
   fi
   # we're done
   return 0
@@ -46,6 +48,8 @@
       # TODO: remove trailing space
       sed -i 
's/^\('$name':.*\)ldap[[:space:]]*\(\[[^]]*\]\)*[[:space:]]*\(.*\)$/\1\3/' 
/etc/nsswitch.conf
     fi
+    # invalidate nscd cache
+    nscd -i "$name" > /dev/null 2>&1 || true
   fi
   # we're done
   return 0
@@ -70,17 +74,6 @@
   done
   # we're done
   db_stop
-  # restart nscd to pick up changes in nsswitch.conf
-  # (other processes will have to be restarted manually)
-  if [ -x /etc/init.d/nscd ] && [ `pidof -s nscd` ]
-  then
-    if which invoke-rc.d >/dev/null 2>&1
-    then
-      invoke-rc.d nscd restart
-    else
-      /etc/init.d/nscd restart
-    fi
-  fi
   # update the cache of the dynamic linker
   # (we don't use dh_makeshlibs because that also installs a shlibs file
   # which we don't need)
-- 
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits