diff options
author | Stefan Walter <stefan@FreeBSD.org> | 2008-12-12 15:10:52 +0000 |
---|---|---|
committer | Stefan Walter <stefan@FreeBSD.org> | 2008-12-12 15:10:52 +0000 |
commit | dd458ecd60848f52da02f311fd5a7423a012914e (patch) | |
tree | 0da9d22478ae0be21fb7631f4d4ecc7b83068d9a /sysutils/fusefs-kmod | |
parent | 64e5930e908916d2f2b1744c9f0be9f8eab329e7 (diff) |
Notes
Diffstat (limited to 'sysutils/fusefs-kmod')
-rw-r--r-- | sysutils/fusefs-kmod/Makefile | 2 | ||||
-rw-r--r-- | sysutils/fusefs-kmod/files/fusefs.in | 34 |
2 files changed, 33 insertions, 3 deletions
diff --git a/sysutils/fusefs-kmod/Makefile b/sysutils/fusefs-kmod/Makefile index d2746e73a177..ea21b42314e0 100644 --- a/sysutils/fusefs-kmod/Makefile +++ b/sysutils/fusefs-kmod/Makefile @@ -7,7 +7,7 @@ PORTNAME= fusefs DISTVERSION= 0.3.9-pre1.20080208 -PORTREVISION= 4 +PORTREVISION= 5 CATEGORIES= sysutils kld MASTER_SITES= http://mercurial.creo.hu/repos/fuse4bsd-hg/index.cgi/archive/ PKGNAMESUFFIX= -kmod diff --git a/sysutils/fusefs-kmod/files/fusefs.in b/sysutils/fusefs-kmod/files/fusefs.in index 3b5d97afacbc..bec25ead9780 100644 --- a/sysutils/fusefs-kmod/files/fusefs.in +++ b/sysutils/fusefs-kmod/files/fusefs.in @@ -13,6 +13,14 @@ # fusefs_enable (bool): Set to NO by default. # Set it to YES to enable fusefs. # +# fusefs_safe (bool): Set to NO by default. +# Set it to YES to wait for all write operations +# to finish before terminating. +# +# fusefs_safe_evil (bool): Set to NO by default. +# Set it to YES to pause the watchdog timer +# while waiting for write operations. +# . %%RC_SUBR%% @@ -46,14 +54,36 @@ fusefs_stop() case "$dev" in /dev/fuse[0-9]*) echo "fusefs: unmounting ${mountpoint}." - umount $mountpoint + umount -f $mountpoint ;; esac done - kldunload $kmod + if checkyesno "${name}_safe_evil"; then + if [ -n "$_rcshutdown_watchdog" ]; then + echo "fusefs: pausing watchdog timer." + kill -STOP "$_rcshutdown_watchdog" + fi + fi + if checkyesno "${name}_safe"; then + printf "fusefs: unloading $kmod... " + while ! kldunload $kmod 2> /dev/null; do + sleep 0.25 + done + echo "done." + else + kldunload $kmod + fi + if checkyesno "${name}_safe_evil"; then + if [ -n "$_rcshutdown_watchdog" ]; then + echo "fusefs: continuing watchdog timer." + kill -CONT "$_rcshutdown_watchdog" + fi + fi } load_rc_config $name : ${fusefs_enable="NO"} +: ${fusefs_safe="NO"} +: ${fusefs_safe_evil="NO"} run_rc_command "$1" |