aboutsummaryrefslogtreecommitdiff
path: root/security/ssh/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'security/ssh/Makefile')
-rw-r--r--security/ssh/Makefile12
1 files changed, 7 insertions, 5 deletions
diff --git a/security/ssh/Makefile b/security/ssh/Makefile
index e97a892b7a65..891cdf183aa5 100644
--- a/security/ssh/Makefile
+++ b/security/ssh/Makefile
@@ -101,14 +101,16 @@ fetch-depends:
post-install:
@if [ ! -f ${PREFIX}/etc/ssh_host_key ]; then \
- ${ECHO} "Generating a secret host key..."; \
- ${PREFIX}/bin/ssh-keygen -f ${PREFIX}/etc/ssh_host_key -N ""; \
- fi
- @if [ ! -f ${PREFIX}/etc/rc.d/sshd.sh ]; then \
+ ${ECHO} "Generating a secret host key..."; \
+ ${PREFIX}/bin/ssh-keygen -f ${PREFIX}/etc/ssh_host_key -N ""; \
+ fi; \
+ if [ "`grep ssh /etc/inetd.conf|grep -v ^#ssh`" = "" ]; then \
+ if [ ! -f ${PREFIX}/etc/rc.d/sshd.sh ]; then \
${ECHO} "Installing ${PREFIX}/etc/rc.d/sshd.sh startup file."; \
${SED} -e 's+!!PREFIX!!+${PREFIX}+g' ${FILESDIR}/sshd.sh \
- > ${PREFIX}/etc/rc.d/sshd.sh; \
+ > ${PREFIX}/etc/rc.d/sshd.sh; \
${CHMOD} 751 ${PREFIX}/etc/rc.d/sshd.sh; \
+ fi; \
fi
.include <bsd.port.pre.mk>