# If you are having problems with AFS shutting down cleanly or the system not
# rebooting because the partition the AFS cache was on could not be unmounted,
# try installing lsof and uncommenting this. This will cause all processes
-# with open AFS files to be killed before unmounting AFS.
+# with open AFS files to be killed before unmounting AFS if the runlevel being
+# switched to is 0 or 6.
#
# Warning: This means /etc/init.d/openafs-client stop will kill all processes
# with files open in AFS rather than returning an error saying the file system
-# is busy. This is what you want when the whole system is shutting down, but
-# often *not* what you want when just stopping and restarting the client.
-# OpenAFS has no way of distinguishing between those two cases. Only enable
-# this if you're certain it's what you want.
+# is busy. This is probably what you want when the whole system is shutting
+# down, but often *not* what you want when just stopping and restarting the
+# client. The code doesn't run unless the runlevel is 0 or 6, but still, be
+# sure that this is what you want before enabling it.
#AFS_PRE_SHUTDOWN=kill_all_afs
openafs (1.4rc3-1) unstable; urgency=low
* New upstream version.
+ * When kill_all_afs is enabled in /etc/openafs/afs.conf, only kill AFS
+ processes if the runlevel is 0 or 6. You really only want this when
+ the system is shutting down. (Closes: #325347)
* Translation updates.
- Portuguese (Brazil), thanks André Luís Lopes.
}
# Repeatedly call kill_afs for a series of signals to give AFS-using processes
-# a hope of shutting down cleanly. Not enabled by default. Enable this in
-# /etc/openafs/afs.conf (but see the warning in that file).
+# a hope of shutting down cleanly if the system is shutting down. Not enabled
+# by default. Enable this in /etc/openafs/afs.conf.
kill_all_afs() {
- if [ -x /usr/bin/lsof ] ; then
- echo -n "Killing processes with AFS files open: "
- kill_afs HUP
- kill_afs TERM
- kill_afs ABRT
- kill_afs KILL
- echo "done."
- else
- echo '/usr/bin/lsof not found, not killing processes' >&2
+ if [ "$RUNLEVEL" -eq 0 ] || [ "$RUNLEVEL" -eq 6 ] ; then
+ if [ -x /usr/bin/lsof ] ; then
+ echo -n "Killing processes with AFS files open: "
+ kill_afs HUP
+ kill_afs TERM
+ kill_afs ABRT
+ kill_afs KILL
+ echo "done."
+ else
+ echo '/usr/bin/lsof not found, not killing processes' >&2
+ fi
fi
}