1
#! /bin/sh /usr/share/dpatch/dpatch-run
2
## 001-fuse-utils_umount_fs
3
## by Javier Merino <cibervicho@gmail.com>
5
## DP: Umount all fuse mounted filesystems before unloading kernel module
6
## DP: in fuse init script.
11
diff -r 151bd3bd9ce6 -r 8f23469f4bb3 debian/fuse-utils.fuse.init
12
--- a/debian/fuse-utils.fuse.init Fri May 25 18:12:25 2007 +0200
13
+++ b/debian/fuse-utils.fuse.init Sun May 27 19:52:32 2007 +0200
14
@@ -46,12 +46,14 @@ do_stop()
17
# 0 if fuse has been stopped
18
- # 1 if kernel module unload failed
19
- # 2 if fusectl filesystem umount failed
20
+ # 1 if fusectl filesystem umount failed
21
+ # 2 if kernel module unload failed
22
+ # 3 if fuse filesystems unmount failed
23
if grep -qw $MOUNTPOINT /proc/mounts; then
24
umount $MOUNTPOINT >/dev/null 2>&1 || \
27
+ umount -at fuse >/dev/null 2>&1 || return 3
28
if grep -qw "^fuse" /proc/modules; then
29
rmmod fuse >/dev/null 2>&1 || return 2
31
@@ -70,15 +72,15 @@ case "$1" in
32
[ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
35
- 0|1) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
36
- 2) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
37
+ 0|2|3) [ "$VERBOSE" != no ] && log_end_msg 0 ;;
38
+ 1) [ "$VERBOSE" != no ] && log_end_msg 1 ;;
42
log_daemon_msg "Restarting $DESC" "$NAME"