diff options
author | alepulver <alepulver@FreeBSD.org> | 2007-12-18 01:22:09 +0800 |
---|---|---|
committer | alepulver <alepulver@FreeBSD.org> | 2007-12-18 01:22:09 +0800 |
commit | e18ed31de0e228cc79d9c22af67d9ec729c6940a (patch) | |
tree | 1fd3986e85906fc3a8ab124d39c9c4aba4043cc2 /sysutils | |
parent | 48eb25371ae92fc49cd517928d93a71b61636f6d (diff) | |
download | freebsd-ports-graphics-e18ed31de0e228cc79d9c22af67d9ec729c6940a.tar.gz freebsd-ports-graphics-e18ed31de0e228cc79d9c22af67d9ec729c6940a.tar.zst freebsd-ports-graphics-e18ed31de0e228cc79d9c22af67d9ec729c6940a.zip |
- Bump PORTREVISION.
- Add checks in rc.d scripts to avoid "double" loading/unloading.
- Add patch-fuse_io.c (fix from
http://mercurial.creo.hu/repos/fuse4bsd-hg/?rev/d7bf90a8cc85).
- Handle "nonempty" option by ignoring it, used by ntfs-3g
(http://mercurial.creo.hu/repos/fuse4bsd-hg/?rev/aef999f12049).
- In the rc.d script unmount FUSE filesystem in the "stop" command, in reverse
order in case the mounts are nested, waiting one second after each. This is
a temporary workaround for umount returning before the cache has been
flushed (which causes for example files not being written to the disk), a
proper solution is being worked on.
- Add note in pkg-message about "stop" rc.d command unmounting FUSE
filesystems.
PR: ports/118758
Submitted by: alepulver (myself)
Approved by: Anish Mistry <amistry@am-productions.biz> (maintainer)
Diffstat (limited to 'sysutils')
-rw-r--r-- | sysutils/fusefs-kmod/Makefile | 2 | ||||
-rw-r--r-- | sysutils/fusefs-kmod/files/fusefs.in | 18 | ||||
-rw-r--r-- | sysutils/fusefs-kmod/files/patch-fuse_io.c | 11 | ||||
-rw-r--r-- | sysutils/fusefs-kmod/files/patch-mount_fusefs-mount_fusefs.c | 16 | ||||
-rw-r--r-- | sysutils/fusefs-kmod/files/pkg-message.in | 5 |
5 files changed, 48 insertions, 4 deletions
diff --git a/sysutils/fusefs-kmod/Makefile b/sysutils/fusefs-kmod/Makefile index 05b934aad0d..03bf5e1c11d 100644 --- a/sysutils/fusefs-kmod/Makefile +++ b/sysutils/fusefs-kmod/Makefile @@ -7,7 +7,7 @@ PORTNAME= fusefs DISTVERSION= 0.3.9-pre1 -PORTREVISION= 2 +PORTREVISION= 3 CATEGORIES= sysutils kld MASTER_SITES= http://fuse4bsd.creo.hu/downloads/ \ http://am-productions.biz/docs/ diff --git a/sysutils/fusefs-kmod/files/fusefs.in b/sysutils/fusefs-kmod/files/fusefs.in index c6eb33661ca..62fd2582765 100644 --- a/sysutils/fusefs-kmod/files/fusefs.in +++ b/sysutils/fusefs-kmod/files/fusefs.in @@ -25,13 +25,31 @@ stop_cmd="fusefs_stop" fusefs_start() { + if kldstat | grep -q fuse\\.ko; then + echo "${name} is already running." + return 0 + fi echo "Starting ${name}." kldload $kmod } fusefs_stop() { + if ! kldstat | grep -q fuse\\.ko; then + echo "${name} is not running." + return 1 + fi echo "Stopping ${name}." +# Unmount FUSE filesystems in reverse order (in case they are nested) with +# a delay of one second after, to allow 'umount' finish. + mount | sed -e '1!G;h;$!d' | while read dev d1 mountpoint d2; do + case "$dev" in + /dev/fuse[0-9]*) + echo "fusefs: unmounting ${mountpoint}." + umount $mountpoint ; sleep 1 + ;; + esac + done kldunload $kmod } load_rc_config $name diff --git a/sysutils/fusefs-kmod/files/patch-fuse_io.c b/sysutils/fusefs-kmod/files/patch-fuse_io.c new file mode 100644 index 00000000000..4d8abbd5ec2 --- /dev/null +++ b/sysutils/fusefs-kmod/files/patch-fuse_io.c @@ -0,0 +1,11 @@ +--- fuse_module/fuse_io.c.orig Tue Jun 19 09:35:22 2007 ++++ fuse_module/fuse_io.c Thu Dec 13 02:46:05 2007 +@@ -148,7 +148,7 @@ + } + + if (uio->uio_resid == 0) +- return (0); ++ goto out; + + if (uio->uio_rw == UIO_WRITE && fp->f_flag & O_APPEND) { + if ((err = VOP_GETATTR(vp, &va, cred, td))) diff --git a/sysutils/fusefs-kmod/files/patch-mount_fusefs-mount_fusefs.c b/sysutils/fusefs-kmod/files/patch-mount_fusefs-mount_fusefs.c index b5f3e946c72..dad69c8ea9b 100644 --- a/sysutils/fusefs-kmod/files/patch-mount_fusefs-mount_fusefs.c +++ b/sysutils/fusefs-kmod/files/patch-mount_fusefs-mount_fusefs.c @@ -1,6 +1,15 @@ ---- mount_fusefs/mount_fusefs.c Sat Jul 14 13:12:09 2007 -+++ mount_fusefs/mount_fusefs.c Sat Jul 14 13:12:09 2007 -@@ -469,7 +469,8 @@ showversion(void) +--- mount_fusefs/mount_fusefs.c.orig Tue Jun 19 09:35:22 2007 ++++ mount_fusefs/mount_fusefs.c Thu Dec 13 02:44:12 2007 +@@ -70,6 +70,8 @@ + { "user_id=", 0, 0x00, 1 }, + { "group_id=", 0, 0x00, 1 }, + { "large_read", 0, 0x00, 1 }, ++ /* "nonempty", just the first two chars are stripped off during parsing */ ++ { "nempty", 0, 0x00, 1 }, + MOPT_STDOPTS, + MOPT_END + }; +@@ -469,7 +471,8 @@ int init_backgrounded(void) { @@ -9,3 +18,4 @@ + size_t len; len = sizeof(ibg); + diff --git a/sysutils/fusefs-kmod/files/pkg-message.in b/sysutils/fusefs-kmod/files/pkg-message.in index 3b7c8d73c7e..81b4143ab9e 100644 --- a/sysutils/fusefs-kmod/files/pkg-message.in +++ b/sysutils/fusefs-kmod/files/pkg-message.in @@ -12,4 +12,9 @@ Now fuse filesystems (sysutils/fusefs-*) can be mounted at startup from /etc/fstab with the "late" parameter. This requires a symlink in /usr/sbin named "mount_<fstype>", which is not created by all the fusefs ports. +Note that the rc.d script will unmount all fuse filesystems when called with +"stop", so it can unload the kernel module, and as a temporary workaround to +flush cache in drivers like NTFS-3G (sysutils/fusefs-ntfs) at shutdown (until +a proper solution is implemented). + ============================================================================== |