mirror of
https://git.FreeBSD.org/ports.git
synced 2024-12-20 04:02:27 +00:00
- Convert rc scripts to the new style.
- Bump PORTREVISION. PR: ports/116966 Submitted by: Dave Grochowski <malus.x@gmail.com> (maintainer) Approved by: stas (mentor, implicit)
This commit is contained in:
parent
b07f4068ac
commit
d5f5e23777
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=203849
@ -8,7 +8,7 @@
|
|||||||
|
|
||||||
PORTNAME= sfs
|
PORTNAME= sfs
|
||||||
PORTVERSION= 0.7.2
|
PORTVERSION= 0.7.2
|
||||||
PORTREVISION= 7
|
PORTREVISION= 8
|
||||||
CATEGORIES= security net
|
CATEGORIES= security net
|
||||||
MASTER_SITES= http://www.fs.net/sfswww/dist/
|
MASTER_SITES= http://www.fs.net/sfswww/dist/
|
||||||
|
|
||||||
@ -19,6 +19,8 @@ PLIST_SUB= SFS_VERSION=${PORTVERSION}
|
|||||||
|
|
||||||
INFO= sfs
|
INFO= sfs
|
||||||
|
|
||||||
|
USE_RC_SUBR= sfscd sfssd
|
||||||
|
|
||||||
USE_GMAKE= yes
|
USE_GMAKE= yes
|
||||||
GNU_CONFIGURE= yes
|
GNU_CONFIGURE= yes
|
||||||
CONFIGURE_ARGS+=--with-sfsuser=sfs \
|
CONFIGURE_ARGS+=--with-sfsuser=sfs \
|
||||||
@ -65,8 +67,6 @@ MAN8= \
|
|||||||
vidb.8
|
vidb.8
|
||||||
|
|
||||||
post-extract:
|
post-extract:
|
||||||
@${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/sfscd.sh > ${WRKSRC}/sfscd.sh
|
|
||||||
@${SED} -e "s=%%PREFIX%%=${PREFIX}=g" ${FILESDIR}/sfssd.sh > ${WRKSRC}/sfssd.sh
|
|
||||||
@${FIND} -E ${WRKDIR} -type f -iregex ".*\.(C|h)" -print0 | \
|
@${FIND} -E ${WRKDIR} -type f -iregex ".*\.(C|h)" -print0 | \
|
||||||
${XARGS} -0 ${REINPLACE_CMD} -e 's/template get/get/'
|
${XARGS} -0 ${REINPLACE_CMD} -e 's/template get/get/'
|
||||||
|
|
||||||
@ -115,8 +115,6 @@ pre-install:
|
|||||||
|
|
||||||
post-install:
|
post-install:
|
||||||
${INSTALL_SCRIPT} ${WRKSRC}/sfsauthd/upgradedb.pl ${PREFIX}/lib/sfs-${PORTVERSION}/upgradedb.pl
|
${INSTALL_SCRIPT} ${WRKSRC}/sfsauthd/upgradedb.pl ${PREFIX}/lib/sfs-${PORTVERSION}/upgradedb.pl
|
||||||
${INSTALL_SCRIPT} ${WRKSRC}/sfscd.sh ${PREFIX}/etc/rc.d/sfscd.sh.sample
|
|
||||||
${INSTALL_SCRIPT} ${WRKSRC}/sfssd.sh ${PREFIX}/etc/rc.d/sfssd.sh.sample
|
|
||||||
${MKDIR} ${PREFIX}/etc/sfs
|
${MKDIR} ${PREFIX}/etc/sfs
|
||||||
${INSTALL_DATA} ${FILESDIR}/etc-sfsrwsd_config.sample ${PREFIX}/etc/sfs/sfsrwsd_config.sample
|
${INSTALL_DATA} ${FILESDIR}/etc-sfsrwsd_config.sample ${PREFIX}/etc/sfs/sfsrwsd_config.sample
|
||||||
${MKDIR} ${PREFIX}/share/doc/sfs
|
${MKDIR} ${PREFIX}/share/doc/sfs
|
||||||
|
48
security/sfs/files/sfscd.in
Normal file
48
security/sfs/files/sfscd.in
Normal file
@ -0,0 +1,48 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# $FreeBSD$
|
||||||
|
#
|
||||||
|
# PROVIDE: sfscd
|
||||||
|
# REQUIRE: NETWORKING
|
||||||
|
# KEYWORD: shutdown
|
||||||
|
#
|
||||||
|
# Add the following line to /etc/rc.conf to enable the sfscd daemon:
|
||||||
|
#
|
||||||
|
# sfscd_enable="YES"
|
||||||
|
#
|
||||||
|
|
||||||
|
. %%RC_SUBR%%
|
||||||
|
|
||||||
|
name=sfscd
|
||||||
|
rcvar=`set_rcvar`
|
||||||
|
|
||||||
|
command="%%PREFIX%%/sbin/${name}"
|
||||||
|
pidfile="/var/run/${name}.pid"
|
||||||
|
|
||||||
|
stop_cmd=stop_cmd
|
||||||
|
|
||||||
|
stop_cmd() {
|
||||||
|
echo "Stopping ${name}"
|
||||||
|
|
||||||
|
users_mounts=`mount | awk '/^@.* on \./ { print $1 }'`
|
||||||
|
|
||||||
|
if [ -n $user_mounts] ; then
|
||||||
|
`echo $users_mounts | xargs umount -f`
|
||||||
|
fi
|
||||||
|
|
||||||
|
if [ -d /sfs/.mnt ] ; then
|
||||||
|
for dir in /sfs/.mnt/*; do
|
||||||
|
umount -f $dir
|
||||||
|
done
|
||||||
|
|
||||||
|
umount -f /sfs
|
||||||
|
fi
|
||||||
|
|
||||||
|
pkill -9 nfsmounter
|
||||||
|
}
|
||||||
|
|
||||||
|
# set defaults
|
||||||
|
sfscd_enable=${sfscd_enable:-"NO"}
|
||||||
|
|
||||||
|
load_rc_config ${name}
|
||||||
|
run_rc_command "$1"
|
@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
PIDFILE=/var/run/sfscd.pid
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
[ -x %%PREFIX%%/sbin/sfscd ] && %%PREFIX%%/sbin/sfscd && echo -n ' sfscd'
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
[ -r $PIDFILE ] && kill -TERM `cat $PIDFILE` && echo -n ' sfscd'
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: `basename $0` {start|stop}" >&2
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
26
security/sfs/files/sfssd.in
Normal file
26
security/sfs/files/sfssd.in
Normal file
@ -0,0 +1,26 @@
|
|||||||
|
#!/bin/sh
|
||||||
|
#
|
||||||
|
# $FreeBSD$
|
||||||
|
#
|
||||||
|
# PROVIDE: sfssd
|
||||||
|
# REQUIRE: NETWORKING
|
||||||
|
# KEYWORD: shutdown
|
||||||
|
#
|
||||||
|
# Add the following line to /etc/rc.conf to enable the sfssd daemon:
|
||||||
|
#
|
||||||
|
# sfssd_enable="YES"
|
||||||
|
#
|
||||||
|
|
||||||
|
. %%RC_SUBR%%
|
||||||
|
|
||||||
|
name=sfssd
|
||||||
|
rcvar=`set_rcvar`
|
||||||
|
|
||||||
|
command="%%PREFIX%%/sbin/${name}"
|
||||||
|
pidfile="/var/run/${name}.pid"
|
||||||
|
|
||||||
|
# set defaults
|
||||||
|
sfssd_enable=${sfssd_enable:-"NO"}
|
||||||
|
|
||||||
|
load_rc_config ${name}
|
||||||
|
run_rc_command "$1"
|
@ -1,17 +0,0 @@
|
|||||||
#!/bin/sh
|
|
||||||
|
|
||||||
PIDFILE=/var/run/sfssd.pid
|
|
||||||
|
|
||||||
case "$1" in
|
|
||||||
start)
|
|
||||||
[ -x %%PREFIX%%/sbin/sfssd ] && %%PREFIX%%/sbin/sfssd && echo -n ' sfssd'
|
|
||||||
;;
|
|
||||||
stop)
|
|
||||||
[ -r $PIDFILE ] && kill -TERM `cat $PIDFILE` && echo -n ' sfssd'
|
|
||||||
;;
|
|
||||||
*)
|
|
||||||
echo "Usage: `basename $0` {start|stop}" >&2
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
|
|
||||||
exit 0
|
|
@ -7,10 +7,6 @@ bin/sfsdeclog
|
|||||||
bin/sfskey
|
bin/sfskey
|
||||||
bin/sfsproac
|
bin/sfsproac
|
||||||
bin/ssu
|
bin/ssu
|
||||||
@unexec if [ -f %D/etc/rc.d/sfscd.sh ]; then cmp -s %D/etc/rc.d/sfscd.sh.sample %D/etc/rc.d/sfscd.sh && rm -f %D/etc/rc.d/sfscd.sh || echo "${PKG_PREFIX}/etc/rc.d/sfscd.sh is different than distribution sample, leaving for manual cleanup." | fmt; fi
|
|
||||||
etc/rc.d/sfscd.sh.sample
|
|
||||||
@unexec if [ -f %D/etc/rc.d/sfssd.sh ]; then cmp -s %D/etc/rc.d/sfssd.sh.sample %D/etc/rc.d/sfssd.sh && rm -f %D/etc/rc.d/sfssd.sh || echo "${PKG_PREFIX}/etc/rc.d/sfssd.sh is different than distribution sample, leaving for manual cleanup." | fmt; fi
|
|
||||||
etc/rc.d/sfssd.sh.sample
|
|
||||||
etc/sfs/sfsrwsd_config.sample
|
etc/sfs/sfsrwsd_config.sample
|
||||||
include/sfs
|
include/sfs
|
||||||
include/sfs-%%SFS_VERSION%%/aclnt.h
|
include/sfs-%%SFS_VERSION%%/aclnt.h
|
||||||
|
Loading…
Reference in New Issue
Block a user