diff options
Diffstat (limited to 'japanese')
-rw-r--r-- | japanese/ebnetd/Makefile | 3 | ||||
-rw-r--r-- | japanese/ebnetd/distinfo | 1 | ||||
-rw-r--r-- | japanese/ebnetd/files/ndtpd.sh.sample | 41 | ||||
-rw-r--r-- | japanese/ndtpd/Makefile | 3 | ||||
-rw-r--r-- | japanese/ndtpd/distinfo | 1 | ||||
-rw-r--r-- | japanese/ndtpd/files/ndtpd.sh.sample | 41 |
6 files changed, 54 insertions, 36 deletions
diff --git a/japanese/ebnetd/Makefile b/japanese/ebnetd/Makefile index 214b40cb9367..8c7c33255f68 100644 --- a/japanese/ebnetd/Makefile +++ b/japanese/ebnetd/Makefile @@ -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 diff --git a/japanese/ebnetd/distinfo b/japanese/ebnetd/distinfo index 16ef41c2ab69..c618c455e5a6 100644 --- a/japanese/ebnetd/distinfo +++ b/japanese/ebnetd/distinfo @@ -1 +1,2 @@ MD5 (ndtpd-2.3.8.tar.gz) = eef3dd6caa2c2e9c86ad6ca458670567 +MD5 (ndtpd-2.3.8+2.diff) = f2df1db77591257c758a5f726a626eb7 diff --git a/japanese/ebnetd/files/ndtpd.sh.sample b/japanese/ebnetd/files/ndtpd.sh.sample index bbf4f41b7508..0db8c8db6c9a 100644 --- a/japanese/ebnetd/files/ndtpd.sh.sample +++ b/japanese/ebnetd/files/ndtpd.sh.sample @@ -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};; +start) + MakeWorkingDirectory + if [ "${standalone}" = YES ]; then + ndtpd && echo -n " ndtpd" + fi + ;; stop) - eval ${ctrl} terminate;; - -start|*) - MakeWorkingDirectory - eval ${start};; + if [ "${standalone}" = YES ]; then + ndtpcontrol terminate && echo -n " ndtpd" + fi + ;; +*) + echo "usage: `basename $0` {start|stop}" >&2 + exit 22 + ;; esac exit diff --git a/japanese/ndtpd/Makefile b/japanese/ndtpd/Makefile index 214b40cb9367..8c7c33255f68 100644 --- a/japanese/ndtpd/Makefile +++ b/japanese/ndtpd/Makefile @@ -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 diff --git a/japanese/ndtpd/distinfo b/japanese/ndtpd/distinfo index 16ef41c2ab69..c618c455e5a6 100644 --- a/japanese/ndtpd/distinfo +++ b/japanese/ndtpd/distinfo @@ -1 +1,2 @@ MD5 (ndtpd-2.3.8.tar.gz) = eef3dd6caa2c2e9c86ad6ca458670567 +MD5 (ndtpd-2.3.8+2.diff) = f2df1db77591257c758a5f726a626eb7 diff --git a/japanese/ndtpd/files/ndtpd.sh.sample b/japanese/ndtpd/files/ndtpd.sh.sample index bbf4f41b7508..0db8c8db6c9a 100644 --- a/japanese/ndtpd/files/ndtpd.sh.sample +++ b/japanese/ndtpd/files/ndtpd.sh.sample @@ -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};; +start) + MakeWorkingDirectory + if [ "${standalone}" = YES ]; then + ndtpd && echo -n " ndtpd" + fi + ;; stop) - eval ${ctrl} terminate;; - -start|*) - MakeWorkingDirectory - eval ${start};; + if [ "${standalone}" = YES ]; then + ndtpcontrol terminate && echo -n " ndtpd" + fi + ;; +*) + echo "usage: `basename $0` {start|stop}" >&2 + exit 22 + ;; esac exit |