~ubuntu-branches/ubuntu/hardy/fuse/hardy-security

« back to all changes in this revision

Viewing changes to debian/patches/001-fuse-utils_umount_fs

  • Committer: Bazaar Package Importer
  • Author(s): Colin Watson
  • Date: 2007-08-04 08:09:00 UTC
  • mfrom: (1.1.8 upstream)
  • Revision ID: james.westby@ubuntu.com-20070804080900-m1e9xpk5eitzmelg
Tags: 2.7.0-1ubuntu1
* Resynchronise with Debian (LP: #128292). Remaining changes:
  - Don't install the init script; install the udev rule and the module
    configuration file instead.
  - debian/45-fuse.rules: set /dev/fuse group to fuse.
  - debian/fuse-utils.modprobe: module configuration file that mounts the
    control filesystem when fuse is loaded and unmounts it when fuse is
    unloaded, along with checking that the control FS is mounting before
    unmounting it.
  - debian/fuse-utils.install: add the udev rule, the module configuration
    file, and ulockmgr_server.
  - Load fuse on install, and set it so it gets loaded on reboot.
  - Move fusermount and ulockmgr_server to /bin and associated libraries
    to /lib.
* Use dpkg-query to fetch conffile md5sums rather than parsing
  /var/lib/dpkg/status directly.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#! /bin/sh /usr/share/dpatch/dpatch-run
 
2
## 001-fuse-utils_umount_fs
 
3
## by Javier Merino <cibervicho@gmail.com>
 
4
##
 
5
## DP: Umount all fuse mounted filesystems before unloading kernel module
 
6
## DP: in fuse init script.
 
7
## DP: See #411143
 
8
 
 
9
@DPATCH@
 
10
 
 
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()
 
15
 {
 
16
        # Return
 
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 || \
 
25
                         return 1
 
26
         fi
 
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
 
30
         fi
 
31
@@ -70,15 +72,15 @@ case "$1" in
 
32
        [ "$VERBOSE" != no ] && log_daemon_msg "Stopping $DESC" "$NAME"
 
33
        do_stop
 
34
        case "$?" in
 
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 ;;
 
39
        esac
 
40
        ;;
 
41
   restart|force-reload)
 
42
        log_daemon_msg "Restarting $DESC" "$NAME"
 
43
        do_stop
 
44
        case "$?" in
 
45
-         0|1)
 
46
+         0|2|3)
 
47
                do_start
 
48
                case "$?" in
 
49
                        0) log_end_msg 0 ;;