Gentoo Archives: gentoo-commits

From: "Robin H. Johnson (robbat2)" <robbat2@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/openssh/files: sshd.rc6.4
Date: Wed, 28 Nov 2012 01:07:16
Message-Id: 20121128010704.B043420C65@flycatcher.gentoo.org
1 robbat2 12/11/28 01:07:04
2
3 Modified: sshd.rc6.4
4 Log:
5 Bug #410541: prepare for detection of net variants to warn if the user needs a rc_need for the actual interface to bind to. Not installed in the rebuild pending ACK fro vapier.
6
7 (Portage version: 2.2.0_alpha142/cvs/Linux x86_64, unsigned Manifest commit)
8
9 Revision Changes Path
10 1.2 net-misc/openssh/files/sshd.rc6.4
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/files/sshd.rc6.4?rev=1.2&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/files/sshd.rc6.4?rev=1.2&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/openssh/files/sshd.rc6.4?r1=1.1&r2=1.2
15
16 Index: sshd.rc6.4
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/net-misc/openssh/files/sshd.rc6.4,v
19 retrieving revision 1.1
20 retrieving revision 1.2
21 diff -p -w -b -B -u -u -r1.1 -r1.2
22 --- sshd.rc6.4 28 Nov 2012 00:32:24 -0000 1.1
23 +++ sshd.rc6.4 28 Nov 2012 01:07:04 -0000 1.2
24 @@ -1,20 +1,41 @@
25 #!/sbin/runscript
26 # Copyright 1999-2012 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/files/sshd.rc6.4,v 1.1 2012/11/28 00:32:24 robbat2 Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-misc/openssh/files/sshd.rc6.4,v 1.2 2012/11/28 01:07:04 robbat2 Exp $
30
31 extra_commands="checkconfig gen_keys"
32 extra_started_commands="reload"
33
34 +SSHD_CONFDIR=${SSHD_CONFDIR:-/etc/ssh}
35 +SSHD_CONFIG=${SSHD_CONFIG:-${SSHD_CONFDIR}/sshd_config}
36 +SSHD_PIDFILE=${SSHD_PIDFILE:-/var/run/${SVCNAME}.pid}
37 +SSHD_BINARY=${SSHD_BINARY:-/usr/sbin/sshd}
38 +
39 depend() {
40 use logger dns
41 + if [ "${rc_need+set}" = "set" ]; then
42 + : # Do nothing, the user has explicitly set rc_need
43 + else
44 + warn_addr=''
45 + for x in $(awk '/^ListenAddress/{ print $2 }' "$SSHD_CONFIG" 2>/dev/null) ; do
46 + case "$x" in
47 + 0.0.0.0|0.0.0.0:*) ;;
48 + ::|\[::\]*) ;;
49 + *) warn_addr="${warn_addr} $x" ;;
50 + esac
51 + done
52 + unset x
53 + if [ "${warn_addr:+set}" = "set" ]; then
54 need net
55 + ewarn "You are binding an interface in ListenAddress statement in your sshd_config!"
56 + ewarn "You must add rc_need=\"net.FOO\" to your /etc/conf.d/sshd"
57 + ewarn "where FOO is the interface(s) providing the following address(es):"
58 + ewarn "${warn_addr}"
59 + fi
60 + unset warn_addr
61 + fi
62 }
63
64 -SSHD_CONFDIR=${SSHD_CONFDIR:-/etc/ssh}
65 -SSHD_PIDFILE=${SSHD_PIDFILE:-/var/run/${SVCNAME}.pid}
66 -SSHD_BINARY=${SSHD_BINARY:-/usr/sbin/sshd}
67 -
68 checkconfig() {
69 if [ ! -d /var/empty ] ; then
70 mkdir -p /var/empty || return 1