summaryrefslogtreecommitdiff
path: root/sysutils/fusefs-kmod/files
diff options
context:
space:
mode:
authorMarcus Alves Grando <mnag@FreeBSD.org>2006-04-05 02:53:39 +0000
committerMarcus Alves Grando <mnag@FreeBSD.org>2006-04-05 02:53:39 +0000
commit25bed4163ad3321e6c0e72be06bf387cfcd5cb8e (patch)
treec66d7d1791e9d4bbea1962be0ae22d59f0afc0d9 /sysutils/fusefs-kmod/files
parent[PATCH] audio/xmms2: Unbreak on 4.x (diff)
- Use USE_RC_SUBR=fusefs instead of =yes
- Reorganize Makefile and rc.d script - Bump PORTREVISION PR: 95064 Submitted by: maintainer
Notes
Notes: svn path=/head/; revision=158817
Diffstat (limited to 'sysutils/fusefs-kmod/files')
-rw-r--r--sysutils/fusefs-kmod/files/fuse.sh34
-rw-r--r--sysutils/fusefs-kmod/files/fusefs.in40
-rw-r--r--sysutils/fusefs-kmod/files/setup.sh2
3 files changed, 41 insertions, 35 deletions
diff --git a/sysutils/fusefs-kmod/files/fuse.sh b/sysutils/fusefs-kmod/files/fuse.sh
deleted file mode 100644
index cc94ae04d447..000000000000
--- a/sysutils/fusefs-kmod/files/fuse.sh
+++ /dev/null
@@ -1,34 +0,0 @@
-#!/bin/sh
-# $FreeBSD$
-
-# PROVIDE: fusefs
-# REQUIRE: sysctl
-# KEYWORD: shutdown
-
-[ -z "${fusefs_enable}" ] && fusefs_enable="NO"
-
-kmod=fuse.ko
-name=fusefs
-
-. /etc/rc.subr
-
-rcvar=`set_rcvar`
-
-start_cmd="fusefs_start"
-stop_cmd="fusefs_stop"
-
-load_rc_config $name
-
-fusefs_start()
-{
- echo "Loading ${name}"
- kldload $kmod
-}
-
-fusefs_stop()
-{
- echo "Unloading ${name}"
- kldunload $kmod
-}
-
-run_rc_command $*
diff --git a/sysutils/fusefs-kmod/files/fusefs.in b/sysutils/fusefs-kmod/files/fusefs.in
new file mode 100644
index 000000000000..f27041f39f50
--- /dev/null
+++ b/sysutils/fusefs-kmod/files/fusefs.in
@@ -0,0 +1,40 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: fusefs
+# REQUIRE: sysctl
+# KEYWORD: shutdown
+#
+# Add the following lines to /etc/rc.conf.local or /etc/rc.conf
+# to enable this service:
+#
+# fusefs_enable (bool): Set to NO by default.
+# Set it to YES to enable fusefs.
+#
+
+. %%RC_SUBR%%
+
+kmod="fuse.ko"
+name="fusefs"
+rcvar=${name}_enable
+
+start_cmd="fusefs_start"
+stop_cmd="fusefs_stop"
+
+fusefs_start()
+{
+ echo "Starting ${name}."
+ kldload $kmod
+}
+
+fusefs_stop()
+{
+ echo "Stopping ${name}."
+ kldunload $kmod
+}
+load_rc_config $name
+
+: ${fusefs_enable="NO"}
+
+run_rc_command "$1"
diff --git a/sysutils/fusefs-kmod/files/setup.sh b/sysutils/fusefs-kmod/files/setup.sh
index 922eb708fed7..eb7c403fcc70 100644
--- a/sysutils/fusefs-kmod/files/setup.sh
+++ b/sysutils/fusefs-kmod/files/setup.sh
@@ -45,7 +45,7 @@ else
echo 'fusefs_enable="YES"' >> ${LOADER_CONFIG}
fi
-@@PREFIX@@/etc/rc.d/fuse.sh start > /dev/null 2>&1 ; RESULT=$?
+@@PREFIX@@/etc/rc.d/fusefs start > /dev/null 2>&1 ; RESULT=$?
if [ ${RESULT} -ne 0 ]; then
echo 'NOTICE: Failed to load the Fuse module!'
echo 'NOTICE: Unload and load Fuse module manually, or reboot.'