mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-25 04:43:33 +00:00
- Use USE_RC_SUBR=fusefs instead of =yes
- Reorganize Makefile and rc.d script - Bump PORTREVISION PR: 95064 Submitted by: maintainer
This commit is contained in:
parent
950bfa7aff
commit
25bed4163a
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=158817
@ -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' \
|
||||
|
@ -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 $*
|
40
sysutils/fusefs-kmod/files/fusefs.in
Normal file
40
sysutils/fusefs-kmod/files/fusefs.in
Normal file
@ -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"
|
@ -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.'
|
||||
|
@ -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.
|
||||
|
@ -1,4 +1,3 @@
|
||||
etc/rc.d/fuse.sh
|
||||
modules/fuse.ko
|
||||
sbin/mount_fusefs
|
||||
@unexec kldxref %D/modules
|
||||
|
Loading…
Reference in New Issue
Block a user