aboutsummaryrefslogtreecommitdiff
path: root/security/openssh
diff options
context:
space:
mode:
authorPav Lucistnik <pav@FreeBSD.org>2006-06-09 21:54:03 +0000
committerPav Lucistnik <pav@FreeBSD.org>2006-06-09 21:54:03 +0000
commit8e32407965d34da87a55833b31d801961b54a632 (patch)
tree7ae9f64aa585886a7b3df6809ec4cafc345844ec /security/openssh
parent9d5b27ea23ab64a17183992578890446f793c270 (diff)
downloadports-8e32407965d34da87a55833b31d801961b54a632.tar.gz
ports-8e32407965d34da87a55833b31d801961b54a632.zip
Notes
Diffstat (limited to 'security/openssh')
-rw-r--r--security/openssh/Makefile18
-rw-r--r--security/openssh/files/sshd.in27
-rw-r--r--security/openssh/files/sshd.sh24
-rw-r--r--security/openssh/pkg-plist1
4 files changed, 38 insertions, 32 deletions
diff --git a/security/openssh/Makefile b/security/openssh/Makefile
index 728385df3631..96b7d722779c 100644
--- a/security/openssh/Makefile
+++ b/security/openssh/Makefile
@@ -7,7 +7,7 @@
PORTNAME= openssh
PORTVERSION= 3.6.1
-PORTREVISION= 5
+PORTREVISION= 6
CATEGORIES= security
MASTER_SITES= ftp://ftp.openbsd.org/pub/OpenBSD/OpenSSH/ \
ftp://ftp.usa.openbsd.org/pub/OpenBSD/OpenSSH/ \
@@ -26,13 +26,19 @@ CONFLICTS?= openssh-portable-* openssh-gssapi-* ssh-1.* ssh2-3.*
USE_OPENSSL= yes
WRKSRC= ${WRKDIR}/ssh
+USE_RC_SUBR= sshd
+
+OPTIONS= AFS "With AFC Support" off \
+ KERBEROS "With Kerberos Support" off \
+ SKEY "With SKEY Support" off
+
MAN1= scp.1 slogin.1 ssh-add.1 ssh-agent.1 ssh-keygen.1 ssh.1 \
ssh-keyscan.1 sftp.1
MAN5= ssh_config.5 sshd_config.5
MAN8= sshd.8 sftp-server.8 ssh-keysign.8
MANCOMPRESSED= yes
-MODIFY= ssh.h sshd_config sshd.sh pathnames.h
+MODIFY= ssh.h sshd_config pathnames.h
FIXME= lib/Makefile scp/Makefile sftp/Makefile sftp-server/Makefile \
ssh/Makefile ssh-add/Makefile ssh-agent/Makefile \
ssh-keygen/Makefile ssh-keyscan/Makefile sshd/Makefile
@@ -63,11 +69,11 @@ MAKE_ENV+= INET6FLAGS=-DINET6
MAKE_ENV+= TCP_WRAPPERS=no
.endif
-.if defined(AFS) && ${AFS} == YES
+.ifdef(WITH_AFS)
MAKE_ENV+= AFS=yes
.endif
-.if defined(KERBEROS) && ${KERBEROS} == YES
+.ifdef(WITH_KERBEROS)
MAKE_ENV+= KERBEROS=yes
.endif
@@ -78,7 +84,7 @@ PAM= no
.endif
MAKE_ENV+= PAM=${PAM}
-.if defined(SKEY) && ${SKEY} == YES
+.ifdef(WITH_SKEY)
SKEY_SUFFIX= -skey
MAKE_ENV+= SKEY=yes
.endif
@@ -89,7 +95,6 @@ ETCSSH= ${PREFIX}/etc/ssh
PLIST_SUB+= EMPTYDIR=${EMPTYDIR}
post-extract:
- @${CP} ${FILESDIR}/sshd.sh ${WRKSRC}/
.for i in ${ADDLIB}
@${CP} ${FILESDIR}/${i} ${WRKSRC}/lib/
.endfor
@@ -157,7 +162,6 @@ post-install:
@${ECHO_MSG} ">> Installing moduli."
${INSTALL_DATA} -c ${FILESDIR}/moduli ${ETCSSH}/moduli
.endif
- ${INSTALL_SCRIPT} ${WRKSRC}/sshd.sh ${PREFIX}/etc/rc.d/sshd.sh.sample
${INSTALL_DATA} -c ${WRKSRC}/ssh_config ${ETCSSH}/ssh_config-dist
${INSTALL_DATA} -c ${WRKSRC}/sshd_config ${ETCSSH}/sshd_config-dist
.if !exists(${ETCSSH}/ssh_config) && !exists(${ETCSSH}/sshd_config) \
diff --git a/security/openssh/files/sshd.in b/security/openssh/files/sshd.in
new file mode 100644
index 000000000000..88e649d01f9a
--- /dev/null
+++ b/security/openssh/files/sshd.in
@@ -0,0 +1,27 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+# PROVIDE: sshd
+# REQUIRE: NETWORKING SERVERS USR
+# BEFORE: LOGIN
+#
+# Add the following lines to /etc/rc.conf to enable sshd
+#
+# sshd_enable (bool): Set to "NO" by default
+# Set it to "YES" to enable sshd
+
+. %%RC_SUBR%%
+
+name="sshd"
+rcvar=${name}_enable
+
+load_rc_config ${name}
+
+: ${sshd_enable="NO"}
+: ${sshd_pidfile="/var/run/sshd.pid"}
+
+command="%%PREFIX%%/sbin/${name}"
+
+run_rc_command "$1"
+
diff --git a/security/openssh/files/sshd.sh b/security/openssh/files/sshd.sh
deleted file mode 100644
index a08d61e67a6d..000000000000
--- a/security/openssh/files/sshd.sh
+++ /dev/null
@@ -1,24 +0,0 @@
-#!/bin/sh
-case "$1" in
-start)
- __PREFIX__/sbin/sshd
- echo -n ' sshd'
- ;;
-stop)
- if [ -f /var/run/sshd.pid ]; then
- kill -TERM `cat /var/run/sshd.pid`
- rm -f /var/run/sshd.pid
- echo -n ' sshd'
- fi
- ;;
-restart)
- if [ -f /var/run/sshd.pid ]; then
- kill -HUP `cat /var/run/sshd.pid`
- echo 'sshd restarted'
- fi
- ;;
-*)
- echo "Usage: ${0##*/}: { start | stop | restart }" >&2
- exit 64
- ;;
-esac
diff --git a/security/openssh/pkg-plist b/security/openssh/pkg-plist
index de51fbc5e3ee..f4d095ca1490 100644
--- a/security/openssh/pkg-plist
+++ b/security/openssh/pkg-plist
@@ -6,7 +6,6 @@ bin/ssh-add
bin/ssh-agent
bin/ssh-keygen
bin/ssh-keyscan
-etc/rc.d/sshd.sh.sample
etc/ssh/moduli
@exec [ -f %D/etc/ssh_config ] && [ ! -f %D/etc/ssh/ssh_config ] && ln %D/etc/ssh_config %D/etc/ssh/ssh_config
@exec [ -f %D/etc/sshd_config ] && [ ! -f %D/etc/ssh/sshd_config ] && ln %D/etc/sshd_config %D/etc/ssh/sshd_config