Modified: trunk/dports/net/openssh/Portfile (108487 => 108488)
--- trunk/dports/net/openssh/Portfile 2013-07-24 12:58:31 UTC (rev 108487)
+++ trunk/dports/net/openssh/Portfile 2013-07-24 14:47:27 UTC (rev 108488)
@@ -5,7 +5,7 @@
name openssh
version 6.2p2
-revision 2
+revision 3
conflicts ssh-copy-id
categories net
@@ -77,8 +77,19 @@
reinplace "s|#Port 22|Port 2222|g" ${destroot}${prefix}/etc/ssh/sshd_config
xinstall -m 755 ${worksrcpath}/contrib/ssh-copy-id ${destroot}${prefix}/bin
xinstall -m 644 ${worksrcpath}/contrib/ssh-copy-id.1 ${destroot}${prefix}/share/man/man1
+ file rename "${destroot}${prefix}/etc/ssh/sshd_config" "${destroot}${prefix}/etc/ssh/sshd_config.example"
+ file rename "${destroot}${prefix}/etc/ssh/ssh_config" "${destroot}${prefix}/etc/ssh/ssh_config.example"
}
+post-activate {
+ if {![file exists "${prefix}/etc/ssh/sshd_config"]} {
+ file copy "${prefix}/etc/ssh/sshd_config.example" "${prefix}/etc/ssh/sshd_config"
+ }
+ if {![file exists "${prefix}/etc/ssh/ssh_config"]} {
+ file copy "${prefix}/etc/ssh/ssh_config.example" "${prefix}/etc/ssh/ssh_config"
+ }
+}
+
default_variants +xauth
variant xauth description {Build with support for xauth} {