mirror of
https://git.FreeBSD.org/ports.git
synced 2024-11-23 00:43:28 +00:00
- Update to the latest version ja-ndtpd-2.3.8 (patched).
- Refine startup script. o Be friends with `/etc/rc.shutdown'. o Accept only standard arguments. o Add a $FreeBSD$ keyword. PR: ports/20836 Submitted by: Kazu TAKAMUNE <takamune@avrl.mei.co.jp> (MAINTAINER)
This commit is contained in:
parent
064e818055
commit
aa19923bc9
Notes:
svn2git
2021-03-31 03:12:20 +00:00
svn path=/head/; revision=32113
@ -10,6 +10,9 @@ PORTVERSION= 2.3.8
|
||||
CATEGORIES= japanese
|
||||
MASTER_SITES= ftp://ftp.sra.co.jp/pub/net/ndtp/ndtpd/
|
||||
|
||||
PATCH_SITES= ${MASTER_SITES}
|
||||
PATCHFILES= ${DISTNAME}+2.diff
|
||||
|
||||
MAINTAINER= takamune@avrl.mei.co.jp
|
||||
|
||||
LIB_DEPENDS= eb.3:${PORTSDIR}/japanese/eb
|
||||
|
@ -1 +1,2 @@
|
||||
MD5 (ndtpd-2.3.8.tar.gz) = eef3dd6caa2c2e9c86ad6ca458670567
|
||||
MD5 (ndtpd-2.3.8+2.diff) = f2df1db77591257c758a5f726a626eb7
|
||||
|
@ -1,19 +1,25 @@
|
||||
#!/bin/sh -e -
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# startup script for ndtpd
|
||||
|
||||
# Usage: ndtpd.sh [kill|restart|status|terminate|stop|start]
|
||||
# Usage: ndtpd.sh {start|stop}
|
||||
|
||||
command=$1
|
||||
standalone=YES # Run ndtpd as a standalone daemon.
|
||||
#standalone=NO # Run ndtpd as a child of inetd.
|
||||
|
||||
GetDirective() {
|
||||
local directive
|
||||
|
||||
directive=$1
|
||||
|
||||
awk '/^[ ]*'${directive}'[ ]+/ {print $2; exit}' ${conf}
|
||||
}
|
||||
|
||||
MakeWorkingDirectory() {
|
||||
local user group work
|
||||
|
||||
user="`GetDirective user`"
|
||||
group="`GetDirective group`"
|
||||
work="`GetDirective work-path`"
|
||||
@ -24,26 +30,25 @@ MakeWorkingDirectory() {
|
||||
|
||||
conf=@prefix@/etc/ndtpd.conf
|
||||
|
||||
[ -f ${conf} ] || exit
|
||||
ndtpcheck || exit
|
||||
|
||||
if [ "${standalone}" = YES ]; then
|
||||
ctrl=ndtpcontrol
|
||||
start="echo -n ' ndtpd'; ndtpd"
|
||||
else
|
||||
ctrl="echo 'Error: inetd invokes ndtpd.' >&2; false"
|
||||
fi
|
||||
ndtpcheck -c ${conf} || exit
|
||||
|
||||
case "${command}" in
|
||||
kill|restart|status|terminate)
|
||||
eval ${ctrl} ${command};;
|
||||
|
||||
stop)
|
||||
eval ${ctrl} terminate;;
|
||||
|
||||
start|*)
|
||||
start)
|
||||
MakeWorkingDirectory
|
||||
eval ${start};;
|
||||
|
||||
if [ "${standalone}" = YES ]; then
|
||||
ndtpd && echo -n " ndtpd"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
if [ "${standalone}" = YES ]; then
|
||||
ndtpcontrol terminate && echo -n " ndtpd"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "usage: `basename $0` {start|stop}" >&2
|
||||
exit 22
|
||||
;;
|
||||
esac
|
||||
|
||||
exit
|
||||
|
@ -10,6 +10,9 @@ PORTVERSION= 2.3.8
|
||||
CATEGORIES= japanese
|
||||
MASTER_SITES= ftp://ftp.sra.co.jp/pub/net/ndtp/ndtpd/
|
||||
|
||||
PATCH_SITES= ${MASTER_SITES}
|
||||
PATCHFILES= ${DISTNAME}+2.diff
|
||||
|
||||
MAINTAINER= takamune@avrl.mei.co.jp
|
||||
|
||||
LIB_DEPENDS= eb.3:${PORTSDIR}/japanese/eb
|
||||
|
@ -1 +1,2 @@
|
||||
MD5 (ndtpd-2.3.8.tar.gz) = eef3dd6caa2c2e9c86ad6ca458670567
|
||||
MD5 (ndtpd-2.3.8+2.diff) = f2df1db77591257c758a5f726a626eb7
|
||||
|
@ -1,19 +1,25 @@
|
||||
#!/bin/sh -e -
|
||||
#
|
||||
# $FreeBSD$
|
||||
#
|
||||
# startup script for ndtpd
|
||||
|
||||
# Usage: ndtpd.sh [kill|restart|status|terminate|stop|start]
|
||||
# Usage: ndtpd.sh {start|stop}
|
||||
|
||||
command=$1
|
||||
standalone=YES # Run ndtpd as a standalone daemon.
|
||||
#standalone=NO # Run ndtpd as a child of inetd.
|
||||
|
||||
GetDirective() {
|
||||
local directive
|
||||
|
||||
directive=$1
|
||||
|
||||
awk '/^[ ]*'${directive}'[ ]+/ {print $2; exit}' ${conf}
|
||||
}
|
||||
|
||||
MakeWorkingDirectory() {
|
||||
local user group work
|
||||
|
||||
user="`GetDirective user`"
|
||||
group="`GetDirective group`"
|
||||
work="`GetDirective work-path`"
|
||||
@ -24,26 +30,25 @@ MakeWorkingDirectory() {
|
||||
|
||||
conf=@prefix@/etc/ndtpd.conf
|
||||
|
||||
[ -f ${conf} ] || exit
|
||||
ndtpcheck || exit
|
||||
|
||||
if [ "${standalone}" = YES ]; then
|
||||
ctrl=ndtpcontrol
|
||||
start="echo -n ' ndtpd'; ndtpd"
|
||||
else
|
||||
ctrl="echo 'Error: inetd invokes ndtpd.' >&2; false"
|
||||
fi
|
||||
ndtpcheck -c ${conf} || exit
|
||||
|
||||
case "${command}" in
|
||||
kill|restart|status|terminate)
|
||||
eval ${ctrl} ${command};;
|
||||
|
||||
stop)
|
||||
eval ${ctrl} terminate;;
|
||||
|
||||
start|*)
|
||||
start)
|
||||
MakeWorkingDirectory
|
||||
eval ${start};;
|
||||
|
||||
if [ "${standalone}" = YES ]; then
|
||||
ndtpd && echo -n " ndtpd"
|
||||
fi
|
||||
;;
|
||||
stop)
|
||||
if [ "${standalone}" = YES ]; then
|
||||
ndtpcontrol terminate && echo -n " ndtpd"
|
||||
fi
|
||||
;;
|
||||
*)
|
||||
echo "usage: `basename $0` {start|stop}" >&2
|
||||
exit 22
|
||||
;;
|
||||
esac
|
||||
|
||||
exit
|
||||
|
Loading…
Reference in New Issue
Block a user