diff options
author | Mike Frysinger <vapier@gentoo.org> | 2006-02-04 17:49:30 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2006-02-04 17:49:30 +0000 |
commit | 074d98669ba3964c31aef25e32a3a120ed8449c9 (patch) | |
tree | b9fb1905b9a57597baad0bd370df2d61555f70de /net-misc | |
parent | added patch, to work with with >=vdr-1.3.37 (diff) | |
download | gentoo-2-074d98669ba3964c31aef25e32a3a120ed8449c9.tar.gz gentoo-2-074d98669ba3964c31aef25e32a3a120ed8449c9.tar.bz2 gentoo-2-074d98669ba3964c31aef25e32a3a120ed8449c9.zip |
Pass sshd_config to sshd when starting to better help running multiple instances of ssh #121530 by ph.
(Portage version: 2.1_pre4-r1)
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/openssh/ChangeLog | 8 | ||||
-rw-r--r-- | net-misc/openssh/files/sshd.confd | 10 | ||||
-rw-r--r-- | net-misc/openssh/files/sshd.rc6 | 28 | ||||
-rw-r--r-- | net-misc/openssh/openssh-3.9_p1-r3.ebuild | 3 | ||||
-rw-r--r-- | net-misc/openssh/openssh-4.0_p1-r2.ebuild | 3 | ||||
-rw-r--r-- | net-misc/openssh/openssh-4.1_p1-r1.ebuild | 3 | ||||
-rw-r--r-- | net-misc/openssh/openssh-4.2_p1-r1.ebuild | 3 | ||||
-rw-r--r-- | net-misc/openssh/openssh-4.2_p1.ebuild | 3 |
8 files changed, 43 insertions, 18 deletions
diff --git a/net-misc/openssh/ChangeLog b/net-misc/openssh/ChangeLog index a2e3c694f9c3..b1a18ec224ee 100644 --- a/net-misc/openssh/ChangeLog +++ b/net-misc/openssh/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for net-misc/openssh # Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.152 2006/02/03 21:33:11 dertobi123 Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/ChangeLog,v 1.153 2006/02/04 17:49:29 vapier Exp $ + + 04 Feb 2006; Mike Frysinger <vapier@gentoo.org> +files/sshd.confd, + files/sshd.rc6, openssh-3.9_p1-r3.ebuild, openssh-4.0_p1-r2.ebuild, + openssh-4.1_p1-r1.ebuild, openssh-4.2_p1.ebuild, openssh-4.2_p1-r1.ebuild: + Pass sshd_config to sshd when starting to better help running multiple + instances of ssh #121530 by ph. 03 Feb 2006; Tobias Scherbaum <dertobi123@gentoo.org> openssh-4.2_p1-r1.ebuild: diff --git a/net-misc/openssh/files/sshd.confd b/net-misc/openssh/files/sshd.confd new file mode 100644 index 000000000000..8e75908369be --- /dev/null +++ b/net-misc/openssh/files/sshd.confd @@ -0,0 +1,10 @@ +# /etc/conf.d/sshd: config file for /etc/init.d/sshd + +# Where is your sshd_config file stored? + +SSHD_CONFDIR="/etc/ssh" + +# Any random options you want to pass to sshd. +# See the sshd(8) manpage for more info. + +SSHD_OPTS="" diff --git a/net-misc/openssh/files/sshd.rc6 b/net-misc/openssh/files/sshd.rc6 index c70c187823b1..58f5bed5283f 100644 --- a/net-misc/openssh/files/sshd.rc6 +++ b/net-misc/openssh/files/sshd.rc6 @@ -1,51 +1,55 @@ #!/sbin/runscript # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/files/sshd.rc6,v 1.17 2005/12/10 02:41:08 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/files/sshd.rc6,v 1.18 2006/02/04 17:49:30 vapier Exp $ depend() { use logger dns need net } -[[ -z ${SSH_CONFDIR} ]] && SSH_CONFDIR="/etc/ssh" +SSHD_CONFDIR=${SSHD_CONFDIR:-/etc/ssh} checkconfig() { if [[ ! -d /var/empty ]] ; then mkdir -p /var/empty || return 1 fi - if [[ ! -e ${SSH_CONFDIR}/sshd_config ]] ; then - eerror "You need an ${SSH_CONFDIR}/sshd_config file to run sshd" + if [[ ! -e ${SSHD_CONFDIR}/sshd_config ]] ; then + eerror "You need an ${SSHD_CONFDIR}/sshd_config file to run sshd" eerror "There is a sample file in /usr/share/doc/openssh" return 1 fi gen_keys || return 1 - /usr/sbin/sshd -t || return 1 + /usr/sbin/sshd -t ${myopts} || return 1 } gen_keys() { - if [[ ! -e ${SSH_CONFDIR}/ssh_host_key ]] ; then + if [[ ! -e ${SSHD_CONFDIR}/ssh_host_key ]] ; then einfo "Generating Hostkey..." - /usr/bin/ssh-keygen -t rsa1 -b 1024 -f ${SSH_CONFDIR}/ssh_host_key -N '' || return 1 + /usr/bin/ssh-keygen -t rsa1 -b 1024 -f ${SSHD_CONFDIR}/ssh_host_key -N '' || return 1 fi - if [[ ! -e ${SSH_CONFDIR}/ssh_host_dsa_key ]] ; then + if [[ ! -e ${SSHD_CONFDIR}/ssh_host_dsa_key ]] ; then einfo "Generating DSA-Hostkey..." - /usr/bin/ssh-keygen -d -f ${SSH_CONFDIR}/ssh_host_dsa_key -N '' || return 1 + /usr/bin/ssh-keygen -d -f ${SSHD_CONFDIR}/ssh_host_dsa_key -N '' || return 1 fi - if [[ ! -e ${SSH_CONFDIR}/ssh_host_rsa_key ]] ; then + if [[ ! -e ${SSHD_CONFDIR}/ssh_host_rsa_key ]] ; then einfo "Generating RSA-Hostkey..." - /usr/bin/ssh-keygen -t rsa -f ${SSH_CONFDIR}/ssh_host_rsa_key -N '' || return 1 + /usr/bin/ssh-keygen -t rsa -f ${SSHD_CONFDIR}/ssh_host_rsa_key -N '' || return 1 fi return 0 } start() { + local myopts="" + [[ ${SVCNAME} != "sshd" ]] && myopts="${myopts} -o PidFile=/var/run/${SVCNAME}.pid" + [[ ${SSHD_CONFDIR} != "/etc/ssh" ]] && myopts="${myopts} -f ${SSHD_CONFDIR}/sshd_config" + checkconfig || return 1 ebegin "Starting ${SVCNAME}" - /usr/sbin/sshd -o PidFile=/var/run/${SVCNAME}.pid ${SSHD_OPTS} + /usr/sbin/sshd ${myopts} ${SSHD_OPTS} eend $? } diff --git a/net-misc/openssh/openssh-3.9_p1-r3.ebuild b/net-misc/openssh/openssh-3.9_p1-r3.ebuild index b5c4f8d3d31f..e86a6b36301e 100644 --- a/net-misc/openssh/openssh-3.9_p1-r3.ebuild +++ b/net-misc/openssh/openssh-3.9_p1-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-3.9_p1-r3.ebuild,v 1.12 2006/02/03 01:55:18 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-3.9_p1-r3.ebuild,v 1.13 2006/02/04 17:49:30 vapier Exp $ inherit eutils flag-o-matic ccc pam @@ -123,6 +123,7 @@ src_install() { fperms 600 /etc/ssh/sshd_config dobin contrib/ssh-copy-id newinitd "${FILESDIR}"/sshd.rc6 sshd + newconfd "${FILESDIR}"/sshd.confd sshd keepdir /var/empty newpamd "${FILESDIR}"/sshd.pam sshd diff --git a/net-misc/openssh/openssh-4.0_p1-r2.ebuild b/net-misc/openssh/openssh-4.0_p1-r2.ebuild index ec174620475a..8c2c26e1f4ca 100644 --- a/net-misc/openssh/openssh-4.0_p1-r2.ebuild +++ b/net-misc/openssh/openssh-4.0_p1-r2.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-4.0_p1-r2.ebuild,v 1.11 2006/02/04 00:35:57 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-4.0_p1-r2.ebuild,v 1.12 2006/02/04 17:49:30 vapier Exp $ inherit eutils flag-o-matic ccc pam @@ -130,6 +130,7 @@ src_install() { fperms 600 /etc/ssh/sshd_config dobin contrib/ssh-copy-id newinitd "${FILESDIR}"/sshd.rc6 sshd + newconfd "${FILESDIR}"/sshd.confd sshd keepdir /var/empty newpamd "${FILESDIR}"/sshd.pam_include sshd diff --git a/net-misc/openssh/openssh-4.1_p1-r1.ebuild b/net-misc/openssh/openssh-4.1_p1-r1.ebuild index 599bc8a22c57..56bacf95e51d 100644 --- a/net-misc/openssh/openssh-4.1_p1-r1.ebuild +++ b/net-misc/openssh/openssh-4.1_p1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-4.1_p1-r1.ebuild,v 1.12 2006/02/04 00:35:57 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-4.1_p1-r1.ebuild,v 1.13 2006/02/04 17:49:30 vapier Exp $ inherit eutils flag-o-matic ccc pam @@ -131,6 +131,7 @@ src_install() { fperms 600 /etc/ssh/sshd_config dobin contrib/ssh-copy-id newinitd "${FILESDIR}"/sshd.rc6 sshd + newconfd "${FILESDIR}"/sshd.confd sshd keepdir /var/empty newpamd "${FILESDIR}"/sshd.pam_include sshd diff --git a/net-misc/openssh/openssh-4.2_p1-r1.ebuild b/net-misc/openssh/openssh-4.2_p1-r1.ebuild index e3a38dc5a122..694a70122ef4 100644 --- a/net-misc/openssh/openssh-4.2_p1-r1.ebuild +++ b/net-misc/openssh/openssh-4.2_p1-r1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-4.2_p1-r1.ebuild,v 1.11 2006/02/04 00:35:57 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-4.2_p1-r1.ebuild,v 1.12 2006/02/04 17:49:30 vapier Exp $ inherit eutils flag-o-matic ccc pam @@ -129,6 +129,7 @@ src_install() { fperms 600 /etc/ssh/sshd_config dobin contrib/ssh-copy-id newinitd "${FILESDIR}"/sshd.rc6 sshd + newconfd "${FILESDIR}"/sshd.confd sshd keepdir /var/empty newpamd "${FILESDIR}"/sshd.pam_include sshd diff --git a/net-misc/openssh/openssh-4.2_p1.ebuild b/net-misc/openssh/openssh-4.2_p1.ebuild index 2ddad987fec6..7bb3f32cdb70 100644 --- a/net-misc/openssh/openssh-4.2_p1.ebuild +++ b/net-misc/openssh/openssh-4.2_p1.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2006 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-4.2_p1.ebuild,v 1.19 2006/02/04 00:35:57 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/openssh-4.2_p1.ebuild,v 1.20 2006/02/04 17:49:30 vapier Exp $ inherit eutils flag-o-matic ccc pam @@ -128,6 +128,7 @@ src_install() { fperms 600 /etc/ssh/sshd_config dobin contrib/ssh-copy-id newinitd "${FILESDIR}"/sshd.rc6 sshd + newconfd "${FILESDIR}"/sshd.confd sshd keepdir /var/empty newpamd "${FILESDIR}"/sshd.pam_include sshd |