aboutsummaryrefslogtreecommitdiff
path: root/ftp/ncftpd
diff options
context:
space:
mode:
authorDavid E. O'Brien <obrien@FreeBSD.org>2004-08-21 03:27:42 +0000
committerDavid E. O'Brien <obrien@FreeBSD.org>2004-08-21 03:27:42 +0000
commitcb0a86a6c9b59b33da9dfcae9f9cf3357c27f302 (patch)
tree7299b62638a2b2154ae34cb9e07786c2342ae18e /ftp/ncftpd
parent7dc9c23fdd6a24ca8140b1b7b1d2f72f694e120c (diff)
downloadports-cb0a86a6c9b59b33da9dfcae9f9cf3357c27f302.tar.gz
ports-cb0a86a6c9b59b33da9dfcae9f9cf3357c27f302.zip
Notes
Diffstat (limited to 'ftp/ncftpd')
-rw-r--r--ftp/ncftpd/scripts/ncftpd.sh11
1 files changed, 9 insertions, 2 deletions
diff --git a/ftp/ncftpd/scripts/ncftpd.sh b/ftp/ncftpd/scripts/ncftpd.sh
index 6799c0c7cf20..24030cdfe188 100644
--- a/ftp/ncftpd/scripts/ncftpd.sh
+++ b/ftp/ncftpd/scripts/ncftpd.sh
@@ -1,8 +1,15 @@
#!/bin/sh
if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then
- echo "$0: Cannot determine the PREFIX" >&2
- exit 1
+ case $(dirname $0) in
+ .)
+ PREFIX=$(pwd)
+ ;;
+ *)
+ echo "$0: Cannot determine the PREFIX" >&2
+ exit 1
+ ;;
+esac
fi
args="${PREFIX}/etc/ncftpd/general.cf ${PREFIX}/etc/ncftpd/domain.cf"