Sophie

Sophie

distrib > Scientific%20Linux > 5x > x86_64 > by-pkgid > e13bdbccf28aef9f5083a287bdaf7b69 > files > 31

openafs.SLx-1.4.3-0.rc2.36.src.rpm

#!/bin/sh
#
# kill all processes using AFS with signal $1
# referenced from the OpenAFS init script
#
# http://www.tu-chemnitz.de/urz/afs/openafs/download/suse-7.2/SOURCES/openafs-killafs

if [ $# -eq 1 ]; then
	SIGNAL=$1
else
	SIGNAL=TERM
fi

if [ ! -x /usr/sbin/lsof ]; then
	exit
fi

PIDS=`/usr/sbin/lsof -Fp /afs | /bin/sed -e 's/p//'`


if [ "x" != "x$PIDS" ]; then
	/bin/kill -$SIGNAL $PIDS >/dev/null 2>&1
	sleep 5
fi