Merge pull request #1731 from thypon/iptables

iptables: move to usr/bin + removed systemd service
This commit is contained in:
Andrea Brancaleoni 2015-06-02 22:37:15 +02:00
commit 152a0907e7
4 changed files with 4 additions and 32 deletions

View File

@ -1,11 +0,0 @@
[Unit]
Description=IPv6 Packet Filtering Framework
[Service]
Type=oneshot
ExecStart=/usr/sbin/ip6tables-restore /etc/iptables/ip6tables.rules
ExecStop=/usr/libexec/iptables-flush -6
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

View File

@ -1,11 +1,11 @@
#!/bin/sh #!/bin/sh
# Usage: iptables-flush [-6] # Usage: iptables-flush [-6]
iptables=/usr/sbin/iptables iptables=/usr/bin/iptables
tables="filter mangle raw" tables="filter mangle raw"
if [ "$1" = "-6" ]; then if [ "$1" = "-6" ]; then
iptables=/usr/sbin/ip6tables iptables=/usr/bin/ip6tables
else else
# Only ipv4 has a nat table # Only ipv4 has a nat table
tables="$tables nat" tables="$tables nat"

View File

@ -1,11 +0,0 @@
[Unit]
Description=Packet Filtering Framework
[Service]
Type=oneshot
ExecStart=/usr/sbin/iptables-restore /etc/iptables/iptables.rules
ExecStop=/usr/libexec/iptables-flush
RemainAfterExit=yes
[Install]
WantedBy=multi-user.target

View File

@ -1,10 +1,9 @@
# Template file for 'iptables' # Template file for 'iptables'
pkgname=iptables pkgname=iptables
version=1.4.21 version=1.4.21
revision=6 revision=8
build_style=gnu-configure build_style=gnu-configure
build_options="systemd" configure_args="--sbindir=/usr/bin --enable-libipq --enable-shared --enable-devel --enable-bpf-compiler"
configure_args="--enable-libipq --enable-shared --enable-devel --enable-bpf-compiler"
hostmakedepends="pkg-config" hostmakedepends="pkg-config"
makedepends="libpcap-devel" makedepends="libpcap-devel"
short_desc="Linux IPv[46] packet filtering ruleset" short_desc="Linux IPv[46] packet filtering ruleset"
@ -25,11 +24,6 @@ pre_build() {
rm include/linux/types.h rm include/linux/types.h
} }
post_install() { post_install() {
# systemd services.
if [ "$build_option_systemd" ]; then
vmkdir usr/lib/systemd/system
install -m644 ${FILESDIR}/*.service ${DESTDIR}/usr/lib/systemd/system
fi
vsv iptables vsv iptables
vsv ip6tables vsv ip6tables
vinstall ${FILESDIR}/iptables-flush.scripts 755 usr/libexec iptables-flush vinstall ${FILESDIR}/iptables-flush.scripts 755 usr/libexec iptables-flush