* Skip killing processes with files open in AFS if AFS does not appear
to be mounted according to /etc/mtab. Otherwise, we may call lsof
without a specific mount point and kill far more processes than we
intend to. (This code is disabled by default, so this problem would
only be seen by people who enabled it.)
+openafs (1.4.12+dfsg-5) unstable; urgency=low
+
+ * Skip killing processes with files open in AFS if AFS does not appear
+ to be mounted according to /etc/mtab. Otherwise, we may call lsof
+ without a specific mount point and kill far more processes than we
+ intend to. (This code is disabled by default, so this problem would
+ only be seen by people who enabled it.)
+
+ -- Russ Allbery <rra@debian.org> Tue, 04 May 2010 16:26:06 -0700
+
openafs (1.4.12+dfsg-4) unstable; urgency=low
* Apply upstream deltas:
kill_afs() {
signal=$1
mount=`grep ^'AFS ' /etc/mtab | awk '{ print $2 }'`
- pids=`/usr/bin/lsof -Fp $mount | sed 's/p//'`
- if [ -n "$pids" ] ; then
- kill -$signal $pids > /dev/null 2>&1
- sleep 1
+ if [ -n "$mount" ] ; then
+ pids=`/usr/bin/lsof -Fp $mount | sed 's/p//'`
+ if [ -n "$pids" ] ; then
+ kill -$signal $pids > /dev/null 2>&1
+ sleep 1
+ fi
fi
}