Gentoo Archives: gentoo-commits

From: "Ian Delaney (idella4)" <idella4@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-firewall/fwknop/files: fwknopd.confd fwknopd.init fwknop-2.6.0-remove-extra-run-from-paths.patch
Date: Wed, 29 Apr 2015 23:18:59
Message-Id: 20150429231851.B787A977@oystercatcher.gentoo.org
1 idella4 15/04/29 23:18:49
2
3 Modified: fwknopd.confd fwknopd.init
4 Removed: fwknop-2.6.0-remove-extra-run-from-paths.patch
5 Log:
6 bump; ebuild supplied by Coacher in bug #519716, newinitd and newconfd files updated, removed prior version to avoid any mismatch, closes bug #519716
7
8 (Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)
9
10 Revision Changes Path
11 1.2 net-firewall/fwknop/files/fwknopd.confd
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/fwknop/files/fwknopd.confd?rev=1.2&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/fwknop/files/fwknopd.confd?rev=1.2&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/fwknop/files/fwknopd.confd?r1=1.1&r2=1.2
16
17 Index: fwknopd.confd
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-firewall/fwknop/files/fwknopd.confd,v
20 retrieving revision 1.1
21 retrieving revision 1.2
22 diff -u -r1.1 -r1.2
23 --- fwknopd.confd 27 Apr 2014 10:50:49 -0000 1.1
24 +++ fwknopd.confd 29 Apr 2015 23:18:49 -0000 1.2
25 @@ -1,12 +1,12 @@
26 # /etc/conf.d/fwknopd: config file for /etc/init.d/fwknopd
27
28 -# Where are your fwknopd config files stored?
29 +# Path to the fwknopd config files
30
31 FWKNOPD_CONFDIR="/etc/fwknop"
32
33
34 # Options to pass to fwknopd daemon.
35 -# See the fwknopd(8) manpage for more info.
36 +# Refer to the fwknopd(8) manpage for more information.
37
38 FWKNOPD_OPTS=""
39
40 @@ -16,6 +16,7 @@
41 #FWKNOPD_PIDFILE="/run/fwknop/fwknopd.pid"
42
43
44 -# Path to the fwknopd binary (needs to be absolute path).
45 +# Path to the fwknopd binary (needs to be an absolute path).
46
47 #FWKNOPD_BINARY="/usr/sbin/fwknopd"
48 +9
49
50
51
52 1.2 net-firewall/fwknop/files/fwknopd.init
53
54 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/fwknop/files/fwknopd.init?rev=1.2&view=markup
55 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/fwknop/files/fwknopd.init?rev=1.2&content-type=text/plain
56 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/fwknop/files/fwknopd.init?r1=1.1&r2=1.2
57
58 Index: fwknopd.init
59 ===================================================================
60 RCS file: /var/cvsroot/gentoo-x86/net-firewall/fwknop/files/fwknopd.init,v
61 retrieving revision 1.1
62 retrieving revision 1.2
63 diff -u -r1.1 -r1.2
64 --- fwknopd.init 27 Apr 2014 10:50:49 -0000 1.1
65 +++ fwknopd.init 29 Apr 2015 23:18:49 -0000 1.2
66 @@ -1,15 +1,15 @@
67 #!/sbin/runscript
68 -# Copyright 1999-2014 Gentoo Foundation
69 +# Copyright 1999-2015 Gentoo Foundation
70 # Distributed under the terms of the GNU General Public License v2
71 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/fwknop/files/fwknopd.init,v 1.1 2014/04/27 10:50:49 tomwij Exp $
72 +# $Header: /var/cvsroot/gentoo-x86/net-firewall/fwknop/files/fwknopd.init,v 1.2 2015/04/29 23:18:49 idella4 Exp $
73
74 extra_commands="checkconfig"
75 extra_started_commands="reload"
76
77 -FWKNOPD_CONFDIR="${FWKNOPD_CONFDIR:-/etc/fwknop}"
78 -FWKNOPD_CONFIG="${FWKNOPD_CONFDIR}/fwknopd.conf"
79 -FWKNOPD_PIDFILE="${FWKNOPD_PIDFILE:-/run/fwknop/${SVCNAME}.pid}"
80 -FWKNOPD_BINARY="${FWKNOPD_BINARY:-/usr/sbin/fwknopd}"
81 +: ${FWKNOPD_CONFDIR:=/etc/fwknop}
82 +: ${FWKNOPD_CONFIG:=${FWKNOPD_CONFDIR}/fwknopd.conf}
83 +: ${FWKNOPD_PIDFILE:=/run/fwknop/${SVCNAME}.pid}
84 +: ${FWKNOPD_BINARY:=/usr/sbin/fwknopd}
85
86 depend() {
87 need iptables
88 @@ -17,47 +17,52 @@
89 if [ "${rc_need+set}" = "set" ]; then
90 : # Do nothing, the user has explicitly set rc_need
91 else
92 - warn_addr=''
93 + warn_intf=''
94 for x in $(awk '/^PCAP_INTF/{ sub(";$", ""); print $2 }' "${FWKNOPD_CONFIG}" 2>/dev/null); do
95 - warn_addr="${warn_addr} $x"
96 + warn_intf="${warn_intf} $x"
97 done
98 unset x
99 - if [ "${warn_addr:+set}" = "set" ]; then
100 + if [ "${warn_intf:+set}" = "set" ]; then
101 need net
102 ewarn "You are binding an interface in PCAP_INTF statement in your fwknopd.conf!"
103 - ewarn "You must add rc_need=\"net.FOO\" to your /etc/conf.d/${SVCNAME}"
104 + ewarn "You must add rc_need=\"net.FOO\" to your /etc/conf.d/${SVCNAME},"
105 ewarn "where FOO is the following interface(s):"
106 - ewarn "${warn_addr}"
107 + ewarn "${warn_intf}"
108 else
109 # if PCAP_INTF and PCAP_FILE are not set, then fwknopd uses eth0
110 - if [ -z "$(grep "^PCAP_FILE" "${FWKNOPD_CONFIG}")" ]; then
111 + if [ -z "$(grep \"^PCAP_FILE\" ${FWKNOPD_CONFIG})" ]; then
112 need net
113 - ewarn "You are not binding any interface in PCAP_INTF statement in your fwknopd.conf,"
114 - ewarn "neither you providing PCAP_FILE option. Therefore fwknopd will listen on eth0."
115 - ewarn "You must add rc_need=\"net.eth0\" to your /etc/conf.d/${SVCNAME}"
116 + ewarn "You are not binding any interface in PCAP_INTF statement in your
117 +fwknopd.conf,"
118 + ewarn "neither you are providing PCAP_FILE option. Thus fwknopd will listen on
119 +eth0."
120 + ewarn "You must add rc_need=\"net.eth0\" to your /etc/conf.d/${SVCNAME}."
121 fi
122 fi
123 - unset warn_addr
124 + unset warn_intf
125 fi
126 }
127
128 checkconfig() {
129 if [ ! -e "${FWKNOPD_CONFDIR}"/fwknopd.conf ]; then
130 eerror "You need ${FWKNOPD_CONFDIR}/fwknopd.conf file to run fwknopd"
131 - eerror "Example configuration located at /etc/fwknop/fwknopd.conf.example"
132 + eerror "Example is located at /etc/fwknop/fwknopd.conf.example"
133 return 1
134 fi
135
136 if [ ! -e "${FWKNOPD_CONFDIR}"/access.conf ]; then
137 eerror "You need ${FWKNOPD_CONFDIR}/access.conf file to run fwknopd"
138 - eerror "Example configuration located at /etc/fwknop/access.conf.example"
139 + eerror "Example is located at /etc/fwknop/access.conf.example"
140 return 1
141 fi
142
143 - [ "${FWKNOPD_PIDFILE}" != "/run/fwknop/fwknopd.pid" ] \
144 + [ "${FWKNOPD_PIDFILE}" != "/run/fwknop/${SVCNAME}.pid" ] \
145 && FWKNOPD_OPTS="${FWKNOPD_OPTS} --pid-file=${FWKNOPD_PIDFILE}"
146 +
147 [ "${FWKNOPD_CONFDIR}" != "/etc/fwknop" ] \
148 - && FWKNOPD_OPTS="${FWKNOPD_OPTS} -c ${FWKNOPD_CONFDIR}/fwknopd.conf -a ${FWKNOPD_CONFDIR}/access.conf"
149 + && FWKNOPD_OPTS="${FWKNOPD_OPTS} \
150 + --config=${FWKNOPD_CONFDIR}/fwknopd.conf \
151 + --access-file=${FWKNOPD_CONFDIR}/access.conf"
152
153 return 0
154 }
155 @@ -68,7 +73,7 @@
156 ebegin "Starting ${SVCNAME}"
157 start-stop-daemon --start \
158 --exec "${FWKNOPD_BINARY}" --pidfile="${FWKNOPD_PIDFILE}" \
159 - -- "${FWKNOPD_OPTS}"
160 + -- ${FWKNOPD_OPTS}
161 eend $?
162 }
163
164 @@ -91,3 +96,4 @@
165 --exec "${FWKNOPD_BINARY}" --pidfile "${FWKNOPD_PIDFILE}"
166 eend $?
167 }
168 +