--- ports/sysutils/fusefs-kmod/files/fusefs.in 2008-06-22 21:35:27.000000000 +0200 +++ ports/sysutils/fusefs-kmod/files/fusefs.in 2008-06-22 21:44:34.000000000 +0200 @@ -50,9 +50,18 @@ ;; esac done + + # This is an evil yet necessary hack to give fuse the time to + # write all data to the media before the system is shut down. + if [ -n "$rcshutdown_timeout" -a -n "$_rcshutdown_watchdog" ]; then + /bin/kill -STOP "$_rcshutdown_watchdog" + fi until kldunload $kmod; do /bin/sleep 0.25 done + if [ -n "$rcshutdown_timeout" -a -n "$_rcshutdown_watchdog" ]; then + /bin/kill -CONT "$_rcshutdown_watchdog" + fi } load_rc_config $name