summaryrefslogtreecommitdiffstats
path: root/security/openssh
diff options
context:
space:
mode:
authorgreen <green@FreeBSD.org>1999-11-22 22:45:47 +0000
committergreen <green@FreeBSD.org>1999-11-22 22:45:47 +0000
commit4a4f6ae101f609e0e486e483656cc4701d421b24 (patch)
tree49584cf751bb4d78d14bdbd046323353e0b019b6 /security/openssh
parent055a86e1e852755a7d4b333aee22eab37482d363 (diff)
downloadFreeBSD-ports-4a4f6ae101f609e0e486e483656cc4701d421b24.zip
FreeBSD-ports-4a4f6ae101f609e0e486e483656cc4701d421b24.tar.gz
Clean up some shell scripting and replace it with proper Makefile
syntax. Run ssh-keygen for ssh_host_key on port install, not just package install.
Diffstat (limited to 'security/openssh')
-rw-r--r--security/openssh/Makefile20
1 files changed, 12 insertions, 8 deletions
diff --git a/security/openssh/Makefile b/security/openssh/Makefile
index 2f2ab5a..4346897 100644
--- a/security/openssh/Makefile
+++ b/security/openssh/Makefile
@@ -117,18 +117,22 @@ post-patch:
${WRKSRC}/*.[ch]
post-install:
- @if [ ! -f ${PREFIX}/etc/ssh_config -a \
- ! -f ${PREFIX}/etc/sshd_config ]; then \
- cd ${WRKSRC} && ${MAKE} DESTDIR=${PREFIX} distribution; \
- else \
- ${ECHO_MSG} ">> ${PREFIX}/etc/ssh{,d}_config exists, not being replaced!"; \
- ${ECHO_MSG} ">> If this is left over from another version of SSH, you will"; \
- ${ECHO_MSG} ">> need to update it to work with OpenSSH."; \
- fi
+.if !exists(${PREFIX}/etc/ssh_host_key)
+ @${ECHO_MSG} ">> Generating a secret host key."
+ ${PREFIX}/bin/ssh-keygen -N "" ${PREFIX}/etc/ssh_host_key
+.endif
.if !exists(${PREFIX}/etc/rc.d/sshd.sh)
@${ECHO} "#!/bin/sh" > ${PREFIX}/etc/rc.d/sshd.sh
@${ECHO} "[ -x ${PREFIX}/sbin/sshd ] && ${PREFIX}/sbin/sshd && echo -n ' sshd'" >> ${PREFIX}/etc/rc.d/sshd.sh
@${CHMOD} 0555 ${PREFIX}/etc/rc.d/sshd.sh
.endif
+.if !exists(${PREFIX}/etc/ssh_config) && !exists(${PREFIX}/etc/sshd_config)
+ @cd ${WRKSRC}; \
+ ${MAKE} DESTDIR=${PREFIX} distribution
+.else
+ @${ECHO_MSG} ">> ${PREFIX}/etc/ssh{,d}_config exists, not being replaced!"
+ @${ECHO_MSG} ">> If this is left over from another version of SSH, you will"
+ @${ECHO_MSG} ">> need to update it to work with OpenSSH."
+.endif
.include <bsd.port.mk>
OpenPOWER on IntegriCloud