On Mon, 10 Dec 2007 20:18:26 -0800
Doug Barton <[EMAIL PROTECTED]> wrote:

> Alejandro Pulver wrote:
> 
> > Then I have to look for some way to manually
> > unmount FUSE filesystems at shutdown, because they are already mounted
> > at startup. I thought about instructing the fusefs-kmod rc.d script to
> > unmount FUSE filesystems before attempting to unload the kernel module
> > (currently it only loads/unloads fuse.ko).
> 
> Yes, I think that given what we're working with here, that would be a
> good idea regardless. It should be pretty easy to do, you can find a
> sample of something like what you would want in /etc/rc.d/dumpon. Let
> me know if you need help, I'm more than a little interested in getting
> fuse-ntfs set up here.
> 

Thanks, here is what I've got so far: it seems /dev/fuse[0-9]* devices
aren't removed after the corresponding filesystem is unmounted (I guess
they are reused), so instead of listing /dev the list has to be taken
from 'mount'. Also there should be a delay between the 'umount' and
'kldunload' commands. What do you think about the following
(replacement for fusefs_stop function)?

echo "Stopping ${name}."
for fs in `mount | grep '^/dev/fuse[0-9]*' | cut -d ' ' -f 1`; do
        umount $fs
done
sleep 2
kldunload $kmod

Unfortunately it doesn't have a status function to avoid loading when
already loaded and the other way, but can easily be added.

Best Regards,
Ale

Attachment: signature.asc
Description: PGP signature

Reply via email to