summaryrefslogtreecommitdiff
path: root/security/openssh
diff options
context:
space:
mode:
authorBrian Feldman <green@FreeBSD.org>1999-11-22 22:45:47 +0000
committerBrian Feldman <green@FreeBSD.org>1999-11-22 22:45:47 +0000
commit64c59a88a868792789f1216e0dff5f13fa8a5633 (patch)
treee08c3c2178c8280340801c5b5bfaf3c4729cac81 /security/openssh
parentI wish CVS would report new files. This broke the carefully designed (diff)
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.
Notes
Notes: svn path=/head/; revision=23263
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 2f2ab5a32a7c..43468970732f 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>