summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Delaney <idella4@gentoo.org>2015-07-29 11:41:52 +0000
committerIan Delaney <idella4@gentoo.org>2015-07-29 11:41:52 +0000
commit93ea4cb3c28c818bb530b628ba697f8c5da07c0c (patch)
tree25167dc1122bac68a3cba1a8bcdf4c3dc41c4ef1 /net-firewall
parentRevert alpha keyword to ~alpha (wxGTK's dep has been package.use.stable.mask'... (diff)
downloadgentoo-2-93ea4cb3c28c818bb530b628ba697f8c5da07c0c.tar.gz
gentoo-2-93ea4cb3c28c818bb530b628ba697f8c5da07c0c.tar.bz2
gentoo-2-93ea4cb3c28c818bb530b628ba697f8c5da07c0c.zip
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)
Diffstat (limited to 'net-firewall')
-rw-r--r--net-firewall/fwknop/ChangeLog11
-rw-r--r--net-firewall/fwknop/files/fwknopd.confd6
-rw-r--r--net-firewall/fwknop/files/fwknopd.init26
-rw-r--r--net-firewall/fwknop/files/fwknopd.service12
-rw-r--r--net-firewall/fwknop/fwknop-2.6.6-r1.ebuild (renamed from net-firewall/fwknop/fwknop-2.6.6.ebuild)3
5 files changed, 38 insertions, 20 deletions
diff --git a/net-firewall/fwknop/ChangeLog b/net-firewall/fwknop/ChangeLog
index 6dfbb17aea36..ccc93788727c 100644
--- a/net-firewall/fwknop/ChangeLog
+++ b/net-firewall/fwknop/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-firewall/fwknop
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/fwknop/ChangeLog,v 1.7 2015/05/01 09:54:59 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/fwknop/ChangeLog,v 1.8 2015/07/29 11:41:52 idella4 Exp $
+
+*fwknop-2.6.6-r1 (29 Jul 2015)
+
+ 29 Jul 2015; Ian Delaney <idella4@gentoo.org> +files/fwknopd.service,
+ +fwknop-2.6.6-r1.ebuild, -fwknop-2.6.6.ebuild, files/fwknopd.confd,
+ files/fwknopd.init:
+ 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
01 May 2015; Ian Delaney <idella4@gentoo.org> files/fwknopd.confd,
files/fwknopd.init:
diff --git a/net-firewall/fwknop/files/fwknopd.confd b/net-firewall/fwknop/files/fwknopd.confd
index 35dd9dabb38e..63bcd01dd82f 100644
--- a/net-firewall/fwknop/files/fwknopd.confd
+++ b/net-firewall/fwknop/files/fwknopd.confd
@@ -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).
diff --git a/net-firewall/fwknop/files/fwknopd.init b/net-firewall/fwknop/files/fwknopd.init
index 76e834c71712..68db3feda6aa 100644
--- a/net-firewall/fwknop/files/fwknopd.init
+++ b/net-firewall/fwknop/files/fwknopd.init
@@ -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 @@ depend() {
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 @@ start() {
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 @@ stop() {
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 $?
}
diff --git a/net-firewall/fwknop/files/fwknopd.service b/net-firewall/fwknop/files/fwknopd.service
new file mode 100644
index 000000000000..d2e8c3125200
--- /dev/null
+++ b/net-firewall/fwknop/files/fwknopd.service
@@ -0,0 +1,12 @@
+[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
diff --git a/net-firewall/fwknop/fwknop-2.6.6.ebuild b/net-firewall/fwknop/fwknop-2.6.6-r1.ebuild
index 100d0f892c90..195f457cc979 100644
--- a/net-firewall/fwknop/fwknop-2.6.6.ebuild
+++ b/net-firewall/fwknop/fwknop-2.6.6-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2015 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/fwknop/fwknop-2.6.6.ebuild,v 1.2 2015/05/01 04:45:42 idella4 Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/fwknop/fwknop-2.6.6-r1.ebuild,v 1.1 2015/07/29 11:41:52 idella4 Exp $
EAPI=5
@@ -90,6 +90,7 @@ src_install() {
if use server; then
newinitd "${FILESDIR}/fwknopd.init" fwknopd
newconfd "${FILESDIR}/fwknopd.confd" fwknopd
+ systemd_dounit "${FILESDIR}/fwknopd.service"
systemd_newtmpfilesd "${FILESDIR}/fwknopd.tmpfiles.conf" fwknopd.conf
fi