Package: plptools
Version: 1.0.4-4
Severity: normal

Attached, a patch that fixes both #526407 and a similar bug when
stopping plpfuse: rather than catting to a virtual file, the file system
can simply be unmounted.

-- System Information:
Debian Release: 5.0.1
  APT prefers stable
  APT policy: (500, 'stable')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/1 CPU core)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages plptools depends on:
ii  debconf [debconf-2.0]     1.5.24         Debian configuration management sy
ii  fuse-utils                2.7.4-1.1      Filesystem in USErspace (utilities
ii  libattr1                  1:2.4.43-2     Extended attribute shared library
ii  libc6                     2.7-18         GNU C Library: Shared libraries
ii  libfuse2                  2.7.4-1.1      Filesystem in USErspace library
ii  libgcc1                   1:4.3.2-1.1    GCC support library
ii  libncurses5               5.7+20081213-1 shared libraries for terminal hand
ii  libreadline5              5.2-3.1        GNU readline and history libraries
ii  libstdc++6                4.3.2-1.1      The GNU Standard C++ Library v3

plptools recommends no packages.

Versions of packages plptools suggests:
ii  portmap                       6.0-9      RPC port mapper

-- debconf information excluded
--- /etc/init.d/plptools        2008-07-25 17:42:40.000000000 +0100
+++ plptools    2009-05-01 02:48:01.000000000 +0100
@@ -17,6 +17,7 @@
 DESC=plptools
 #CONFIG=/etc/plptools.conf
 CONFIG=/etc/default/plptools
+MOUNTPOINT=/var/lib/plptools/mnt
 
 test -x $DAEMON1 || exit 0
 test -x $DAEMON2 || exit 0
@@ -37,9 +38,11 @@
        fi
        if test "$START_PLPFUSE" = "yes" ; then
                echo -n "Starting $DESC ($DAEMON2): "
-               modprobe fuse
+               if ! grep -q fuse /proc/filesystems; then
+                       modprobe fuse
+               fi
                start-stop-daemon --start --quiet \
-                       --exec $DAEMON2 -- $PLPFUSE_ARGS && \
+                       --exec $DAEMON2 -- $PLPFUSE_ARGS $MOUNTPOINT && \
                        echo -n "done" || echo -n "failed"
                echo "."
        fi
@@ -54,11 +57,7 @@
   stop)
        if test "$START_PLPFUSE" = "yes" ; then
                echo -n "Stopping $DESC ($DAEMON2): "
-#      Stop the daemon more gently
-               if test -e /var/lib/plptools/mnt/proc/exit ; then
-               echo "stop" > /var/lib/plptools/mnt/proc/exit
-               sleep 1
-               fi
+               fusermount -z -u $MOUNTPOINT || true
                start-stop-daemon --stop --retry HUP/5/TERM/1 --quiet \
                                --exec $DAEMON2 && \
                        echo -n "done" || echo -n "already stopped"

Reply via email to