diff options
Diffstat (limited to 'ftp/ncftpd/scripts/ncftpd.sh')
-rw-r--r-- | ftp/ncftpd/scripts/ncftpd.sh | 11 |
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" |