diff options
author | sumikawa <sumikawa@FreeBSD.org> | 2000-01-22 14:40:20 +0800 |
---|---|---|
committer | sumikawa <sumikawa@FreeBSD.org> | 2000-01-22 14:40:20 +0800 |
commit | b4f26b7cb62a5c06d9442484ae044037bbb3fa93 (patch) | |
tree | ed4c8ae98f7c856b1cd62105a8732c2e00e5a489 /japanese/ebnetd/files | |
parent | 7f8581a250151c59ab67e4eaaf7f50fd57498e22 (diff) | |
download | freebsd-ports-gnome-b4f26b7cb62a5c06d9442484ae044037bbb3fa93.tar.gz freebsd-ports-gnome-b4f26b7cb62a5c06d9442484ae044037bbb3fa93.tar.zst freebsd-ports-gnome-b4f26b7cb62a5c06d9442484ae044037bbb3fa93.zip |
Upgrade to 2.3.6.
Changes (from PR):
- japanese/ndtpd
o Set default syslog file for `/var/log/ndtpd.log'.
o Change the default working directory `/var/ndtpd' to `/var/run/ndtpd'.
* It will created by `${PREFIX}/etc/rc.d/ndtpd.sh'
(even if the user select "Inetd mode" !)
* Lock files and a PID file are created under it.
o Support some arguments in the startup script:
${PREFIX}/etc/rc.d/ndtpd.sh start|stop|kill|restart|status|terminate
o Separate the session to build `ndtpd.sh.sample'
from `post-install' into `post-build'.
o Don't configure EB sybsystem in NDTPD.
- japanese/eb
o Don't configure ZLIB sybsystem in EB.
o Don't define CONFIGURE_ENV.
* Suggested by Michael's last commit to japanese/ndtpd/Makefile.
PR: 16117
Submitted by: Kazu TAKAMUNE <takamune@avrl.mei.co.jp>
Diffstat (limited to 'japanese/ebnetd/files')
-rw-r--r-- | japanese/ebnetd/files/ndtpd.sh.sample | 62 |
1 files changed, 48 insertions, 14 deletions
diff --git a/japanese/ebnetd/files/ndtpd.sh.sample b/japanese/ebnetd/files/ndtpd.sh.sample index 17a62fc0aab8..bbf4f41b7508 100644 --- a/japanese/ebnetd/files/ndtpd.sh.sample +++ b/japanese/ebnetd/files/ndtpd.sh.sample @@ -1,15 +1,49 @@ -#!/bin/sh - -# -# NDTPD: rc-file for FreeBSD. -# - -### NDTPD options: ### -ndtpd_program=@prefix@/sbin/ndtpd # path to ndtpd. -ndtpd_enable=YES # Run ndtpd (or NO). -ndtpd_flags= # Flags to ndtpd (if enabled). -### End of NDTPD options: ### - -if [ "x${ndtpd_enable}" = xYES -a -x ${ndtpd_program} ]; then - echo -n " ndtpd" - ${ndtpd_program} ${ndtpd_flags} +#!/bin/sh -e - +# startup script for ndtpd + +# Usage: ndtpd.sh [kill|restart|status|terminate|stop|start] + +command=$1 +standalone=YES # Run ndtpd as a standalone daemon. +#standalone=NO # Run ndtpd as a child of inetd. + +GetDirective() { + directive=$1 + + awk '/^[ ]*'${directive}'[ ]+/ {print $2; exit}' ${conf} +} + +MakeWorkingDirectory() { + user="`GetDirective user`" + group="`GetDirective group`" + work="`GetDirective work-path`" + + rm -rf ${work:=@rundir@/ndtpd} + eval install -d ${user:+-o ${user}} ${group:+-g ${group}} ${work} +} + +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 + +case "${command}" in +kill|restart|status|terminate) + eval ${ctrl} ${command};; + +stop) + eval ${ctrl} terminate;; + +start|*) + MakeWorkingDirectory + eval ${start};; +esac + +exit |