* [gentoo-commits] gentoo-x86 commit in net-firewall/fwknop/files: fwknopd.service fwknopd.confd fwknopd.init
@ 2015-07-29 11:41 Ian Delaney (idella4)
0 siblings, 0 replies; only message in thread
From: Ian Delaney (idella4) @ 2015-07-29 11:41 UTC (permalink / raw
To: gentoo-commits
idella4 15/07/29 11:41:53
Modified: fwknopd.confd fwknopd.init
Added: fwknopd.service
Log:
revbump; new script files added to equip for systemd, other script files edited from patches via bug #554690, remove defunct fwknop-2.6.6.ebuild to avoid any mixing of updated scripts
(Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key 0xB8072B0D)
Revision Changes Path
1.4 net-firewall/fwknop/files/fwknopd.confd
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/fwknop/files/fwknopd.confd?rev=1.4&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/fwknop/files/fwknopd.confd?rev=1.4&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/fwknop/files/fwknopd.confd?r1=1.3&r2=1.4
Index: fwknopd.confd
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-firewall/fwknop/files/fwknopd.confd,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- fwknopd.confd 1 May 2015 09:55:00 -0000 1.3
+++ fwknopd.confd 29 Jul 2015 11:41:52 -0000 1.4
@@ -1,14 +1,14 @@
# /etc/conf.d/fwknopd: config file for /etc/init.d/fwknopd
-# Path to the fwknopd config files
+# Path to the fwknopd config directory (needs to be an absolute path).
FWKNOPD_CONFDIR="/etc/fwknop"
-# Options to pass to fwknopd daemon.
+# Additional options to pass to fwknopd.
# Refer to the fwknopd(8) manpage for more information.
-FWKNOPD_OPTS=""
+#FWKNOPD_OPTS=""
# Pid file to use (needs to be an absolute path).
1.5 net-firewall/fwknop/files/fwknopd.init
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/fwknop/files/fwknopd.init?rev=1.5&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/fwknop/files/fwknopd.init?rev=1.5&content-type=text/plain
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/fwknop/files/fwknopd.init?r1=1.4&r2=1.5
Index: fwknopd.init
===================================================================
RCS file: /var/cvsroot/gentoo-x86/net-firewall/fwknop/files/fwknopd.init,v
retrieving revision 1.4
retrieving revision 1.5
diff -u -r1.4 -r1.5
--- fwknopd.init 1 May 2015 09:55:00 -0000 1.4
+++ fwknopd.init 29 Jul 2015 11:41:52 -0000 1.5
@@ -1,28 +1,27 @@
#!/sbin/runscript
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/fwknop/files/fwknopd.init,v 1.4 2015/05/01 09:55:00 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/fwknop/files/fwknopd.init,v 1.5 2015/07/29 11:41:52 idella4 Exp $
extra_commands="checkconfig"
extra_started_commands="reload"
+: ${FWKNOPD_BINARY:=/usr/sbin/fwknopd}
: ${FWKNOPD_CONFDIR:=/etc/fwknop}
: ${FWKNOPD_CONFIG:=${FWKNOPD_CONFDIR}/fwknopd.conf}
: ${FWKNOPD_PIDFILE:=/run/fwknop/${SVCNAME}.pid}
-: ${FWKNOPD_BINARY:=/usr/sbin/fwknopd}
depend() {
- need iptables
+ after iptables ip6tables ebtables firewall
use logger
if [ "${rc_need+set}" = "set" ]; then
: # Do nothing, the user has explicitly set rc_need
else
- warn_intf=''
+ local x warn_intf
for x in $(awk '/^PCAP_INTF/{ sub(";$", ""); print $2 }' "${FWKNOPD_CONFIG}" 2>/dev/null); do
- warn_intf="${warn_intf} $x"
+ warn_intf="${warn_intf} ${x}"
done
- unset x
- if [ "${warn_intf:+set}" = "set" ]; then
+ if [ -n "${warn_intf}" ]; then
need net
ewarn "You are binding an interface in PCAP_INTF statement in your fwknopd.conf!"
ewarn "You must add rc_need=\"net.FOO\" to your /etc/conf.d/${SVCNAME},"
@@ -30,14 +29,13 @@
ewarn "${warn_intf}"
else
# if PCAP_INTF and PCAP_FILE are not set, then fwknopd uses eth0
- if [ -z "$(grep '^PCAP_FILE' ${FWKNOPD_CONFIG})" ]; then
+ if ! grep -q '^PCAP_FILE' "${FWKNOPD_CONFIG}"; then
need net
ewarn "You are not binding any interface in PCAP_INTF statement in your fwknopd.conf,"
ewarn "neither you are providing PCAP_FILE option. Thus fwknopd will listen on eth0."
ewarn "You must add rc_need=\"net.eth0\" to your /etc/conf.d/${SVCNAME}."
fi
fi
- unset warn_intf
fi
}
@@ -70,7 +68,7 @@
ebegin "Starting ${SVCNAME}"
start-stop-daemon --start \
- --exec "${FWKNOPD_BINARY}" --pidfile="${FWKNOPD_PIDFILE}" \
+ --exec ${FWKNOPD_BINARY} --pidfile ${FWKNOPD_PIDFILE} \
-- ${FWKNOPD_OPTS}
eend $?
}
@@ -81,16 +79,14 @@
fi
ebegin "Stopping ${SVCNAME}"
- start-stop-daemon --stop \
- --exec "${FWKNOPD_BINARY}" --pidfile "${FWKNOPD_PIDFILE}"
+ start-stop-daemon --stop --pidfile ${FWKNOPD_PIDFILE}
eend $?
}
reload() {
checkconfig || return 1
- ebegin "Reloading ${SVCNAME}"
- start-stop-daemon --signal HUP \
- --exec "${FWKNOPD_BINARY}" --pidfile "${FWKNOPD_PIDFILE}"
+ ebegin "Reloading ${SVCNAME} configuration"
+ start-stop-daemon --signal HUP --pidfile ${FWKNOPD_PIDFILE}
eend $?
}
1.1 net-firewall/fwknop/files/fwknopd.service
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/fwknop/files/fwknopd.service?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-firewall/fwknop/files/fwknopd.service?rev=1.1&content-type=text/plain
Index: fwknopd.service
===================================================================
[Unit]
Description=Firewall Knock Operator Daemon
After=network-online.target
[Service]
Type=forking
PIDFile=/run/fwknop/fwknopd.pid
ExecStart=/usr/sbin/fwknopd
ExecReload=/bin/kill -HUP $MAINPID
[Install]
WantedBy=multi-user.target
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2015-07-29 11:42 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2015-07-29 11:41 [gentoo-commits] gentoo-x86 commit in net-firewall/fwknop/files: fwknopd.service fwknopd.confd fwknopd.init Ian Delaney (idella4)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox