aboutsummaryrefslogtreecommitdiff
path: root/sysutils/fusefs-kmod
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
parent950bfa7aff761ff1de543a071af9cce56627e804 (diff)
downloadports-25bed4163ad3321e6c0e72be06bf387cfcd5cb8e.tar.gz
ports-25bed4163ad3321e6c0e72be06bf387cfcd5cb8e.zip
- 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')
-rw-r--r--sysutils/fusefs-kmod/Makefile21
-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
-rw-r--r--sysutils/fusefs-kmod/pkg-message4
-rw-r--r--sysutils/fusefs-kmod/pkg-plist1
6 files changed, 55 insertions, 47 deletions
diff --git a/sysutils/fusefs-kmod/Makefile b/sysutils/fusefs-kmod/Makefile
index 3d666c4bd7cd..10313f62790a 100644
--- a/sysutils/fusefs-kmod/Makefile
+++ b/sysutils/fusefs-kmod/Makefile
@@ -7,6 +7,7 @@
PORTNAME= fusefs
PORTVERSION= 0.3.0
+PORTREVISION= 1
CATEGORIES= sysutils
MASTER_SITES= http://fuse4bsd.creo.hu/downloads/ \
http://am-productions.biz/docs/
@@ -18,15 +19,16 @@ COMMENT= Kernel module for fuse
BUILD_DEPENDS= fusefs-libs>2.4.1:${PORTSDIR}/sysutils/fusefs-libs
-OPTIONS= AUTOSETUP "Automatic global config file setup" off
-MAKE_ENV+= BINDIR="${PREFIX}/sbin" MANDIR="${PREFIX}/man/man"
-MAN8= mount_fusefs.8
+MAKE_ENV= BINDIR="${PREFIX}/sbin" MANDIR="${PREFIX}/man/man"
+
+SRC_BASE?= /usr/src
KMODDIR= ${PREFIX}/modules
MAKE_ARGS= KMODDIR=${KMODDIR}
-SRC_BASE?= /usr/src
-STARTUP= fuse.sh
-SETUP= setup.sh
MODULE_PATH= `sysctl -n kern.module_path`;${KMODDIR}
+USE_RC_SUBR= fusefs
+SETUP= setup.sh
+
+MAN8= mount_fusefs.8
TXT_DOCS= doc.txt
HTML_DOCS= Faq.html \
Implementation.html \
@@ -44,6 +46,8 @@ HTML_DOCS= Faq.html \
serif.css \
tabbar-right.css
+OPTIONS= AUTOSETUP "Automatic global config file setup" off
+
.include <bsd.port.pre.mk>
.if ${OSVERSION} < 600000
@@ -55,13 +59,12 @@ IGNORE= requires the Kernel source to be installed. Set SRC_BASE if it is not i
.endif
post-configure:
- ${CP} ${LOCALBASE}/include/fuse/fuse_kernel.h ${WRKSRC}/fuse_module
+ @${CP} ${LOCALBASE}/include/fuse/fuse_kernel.h ${WRKSRC}/fuse_module
pre-install:
- ${MKDIR} ${KMODDIR}
+ @${MKDIR} ${KMODDIR}
post-install:
- ${INSTALL_SCRIPT} ${FILESDIR}/${STARTUP} ${PREFIX}/etc/rc.d/
.if (defined(WITH_AUTOSETUP) && !defined(BATCH) && !defined(PACKAGE_BUILDING)) \
|| (defined(WITH_AUTOSETUP) && defined(BATCH) && !defined(PACKAGE_BUILDING))
@${SED} -e 's|@@PREFIX@@|${PREFIX}|g' \
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.'
diff --git a/sysutils/fusefs-kmod/pkg-message b/sysutils/fusefs-kmod/pkg-message
index 6f78bfaa0c6d..2fbfbab80c31 100644
--- a/sysutils/fusefs-kmod/pkg-message
+++ b/sysutils/fusefs-kmod/pkg-message
@@ -2,10 +2,10 @@ In order to automatically load the fuse module on startup, you need to
set the following settings:
- Set the module path in /etc/sysctl.conf:
- kern.module_path=%%MODULE_PATH%%
+ kern.module_path="%%MODULE_PATH%%"
- Add fusefs_enable="YES" to your /etc/rc.conf
-%%PREFIX%%/etc/rc.d/fuse.sh start will load the module for the first time
+%%PREFIX%%/etc/rc.d/fusefs start will load the module for the first time
after the installation. Set "sysctl vfs.usermount=1" if you want to be able
to mount fuse devices as an ordinary user.
diff --git a/sysutils/fusefs-kmod/pkg-plist b/sysutils/fusefs-kmod/pkg-plist
index 305e6c5b8ac3..79d69f1567fb 100644
--- a/sysutils/fusefs-kmod/pkg-plist
+++ b/sysutils/fusefs-kmod/pkg-plist
@@ -1,4 +1,3 @@
-etc/rc.d/fuse.sh
modules/fuse.ko
sbin/mount_fusefs
@unexec kldxref %D/modules