nss-pam-ldapd commit: r2133 - debian/nss-pam-ldapd/trunk/debian
[
Date Prev][
Date Next]
[
Thread Prev][
Thread Next]
nss-pam-ldapd commit: r2133 - debian/nss-pam-ldapd/trunk/debian
- From: Commits of the nss-pam-ldapd project <nss-pam-ldapd-commits [at] lists.arthurdejong.org>
- To: nss-pam-ldapd-commits [at] lists.arthurdejong.org
- Reply-to: nss-pam-ldapd-users [at] lists.arthurdejong.org
- Subject: nss-pam-ldapd commit: r2133 - debian/nss-pam-ldapd/trunk/debian
- Date: Sun, 14 Jun 2015 23:54:47 +0200 (CEST)
Author: arthur
Date: Sun Jun 14 23:54:47 2015
New Revision: 2133
URL: http://arthurdejong.org/viewvc/nss-pam-ldapd?revision=2133&view=revision
Log:
use pathfind from Developer's Reference instead of full path to nslcd and
pynslcd
Modified:
debian/nss-pam-ldapd/trunk/debian/changelog
debian/nss-pam-ldapd/trunk/debian/nslcd.postrm
Modified: debian/nss-pam-ldapd/trunk/debian/changelog
==============================================================================
--- debian/nss-pam-ldapd/trunk/debian/changelog Sun Jun 14 23:31:10 2015
(r2132)
+++ debian/nss-pam-ldapd/trunk/debian/changelog Sun Jun 14 23:54:47 2015
(r2133)
@@ -15,8 +15,10 @@
(thanks Andrew Elble)
* drop avoid-signal-race.patch which is part of 0.9.6
* drop XS-Testsuite from debian/control
+ * use pathfind from Developer's Reference instead of full path to nslcd and
+ pynslcd
- -- Arthur de Jong <adejong@debian.org> Sun, 14 Jun 2015 23:27:24 +0200
+ -- Arthur de Jong <adejong@debian.org> Sun, 14 Jun 2015 23:42:54 +0200
nss-pam-ldapd (0.9.5-2) unstable; urgency=medium
Modified: debian/nss-pam-ldapd/trunk/debian/nslcd.postrm
==============================================================================
--- debian/nss-pam-ldapd/trunk/debian/nslcd.postrm Sun Jun 14 23:31:10
2015 (r2132)
+++ debian/nss-pam-ldapd/trunk/debian/nslcd.postrm Sun Jun 14 23:54:47
2015 (r2133)
@@ -5,9 +5,23 @@
CONFFILE="/etc/nslcd.conf"
OCONFFILE="/etc/nss-ldapd.conf"
+# taken Developer's Reference 6.4
+pathfind() {
+ OLDIFS="$IFS"
+ IFS=:
+ for p in $PATH; do
+ if [ -x "$p/$*" ]; then
+ IFS="$OLDIFS"
+ return 0
+ fi
+ done
+ IFS="$OLDIFS"
+ return 1
+}
+
# remove /var/run/nslcd directory on remove unless an nslcd implementation
# is still installed (e.g. when switching between nslcd and pynslcd)
-if [ "$1" = "remove" ] && ! [ -x /usr/sbin/nslcd ] && ! [ -x /usr/sbin/pynslcd
]
+if [ "$1" = "remove" ] && ! pathfind nslcd && ! pathfind pynslcd
then
rm -rf /var/run/nslcd
fi
@@ -15,7 +29,7 @@
# remove our configuration file (not a conffile) on purge unless an nslcd
# implementation is still installed (e.g. when switching between nslcd and
# pynslcd)
-if [ "$1" = "purge" ] && ! [ -x /usr/sbin/nslcd ] && ! [ -x /usr/sbin/pynslcd ]
+if [ "$1" = "purge" ] && ! pathfind nslcd && ! pathfind pynslcd
then
rm -f "$CONFFILE" "$OCONFFILE"
fi
--
To unsubscribe send an email to
nss-pam-ldapd-commits-unsubscribe@lists.arthurdejong.org or see
http://lists.arthurdejong.org/nss-pam-ldapd-commits/
- nss-pam-ldapd commit: r2133 - debian/nss-pam-ldapd/trunk/debian,
Commits of the nss-pam-ldapd project