[arch-commits] Commit in nftables/trunk (4 files)

Sébastien Luttringer seblu at archlinux.org
Tue Feb 17 00:32:29 UTC 2015


    Date: Tuesday, February 17, 2015 @ 01:32:29
  Author: seblu
Revision: 231628

upgpkg: nftables 1:0.4-3

- fix FS#43401

Added:
  nftables/trunk/nftables-reload
    (from rev 231627, nftables/trunk/nftables-flush)
Modified:
  nftables/trunk/PKGBUILD
  nftables/trunk/nftables.service
Deleted:
  nftables/trunk/nftables-flush

------------------+
 PKGBUILD         |   10 +++++-----
 nftables-flush   |   32 --------------------------------
 nftables-reload  |    3 +++
 nftables.service |    3 ++-
 4 files changed, 10 insertions(+), 38 deletions(-)

Modified: PKGBUILD
===================================================================
--- PKGBUILD	2015-02-16 23:57:38 UTC (rev 231627)
+++ PKGBUILD	2015-02-17 00:32:29 UTC (rev 231628)
@@ -4,7 +4,7 @@
 pkgname=nftables
 epoch=1
 pkgver=0.4
-pkgrel=2
+pkgrel=3
 pkgdesc='Netfilter tables userspace tools'
 arch=('i686' 'x86_64')
 url='http://netfilter.org/projects/nftables/'
@@ -16,12 +16,12 @@
 source=("http://netfilter.org/projects/nftables/files/nftables-$pkgver.tar.bz2"{,.sig}
         'nftables.conf'
         'nftables.service'
-        'nftables-flush')
+        'nftables-reload')
 sha1sums=('c557c710510c59e4280d271e5b7232af7ba3fbb7'
           'SKIP'
           'a7146fad414f9e827e2e83b630308890c876b80d'
-          'a5c1cd98534c3758db1e773ad2a134649a6ac8ac'
-          '30ec956a52407ce1b4f1748f91184b3ff0bb9b7a')
+          '65833b9c5b777cfb3a0776060c569a727ce6f460'
+          'd9f40e751b44dd9dc9fdb3b7eba3cc0a9b7e1b01')
 
 build() {
   cd $pkgname-$pkgver
@@ -41,7 +41,7 @@
   install -Dm644 nftables.conf "$pkgdir/etc/nftables.conf"
   # systemd
   install -Dm644 nftables.service "$pkgdir/usr/lib/systemd/system/nftables.service"
-  install -Dm755 nftables-flush "$pkgdir/usr/lib/systemd/scripts/nftables-flush"
+  install -Dm755 nftables-reload "$pkgdir/usr/lib/systemd/scripts/nftables-reload"
 }
 
 # vim:set ts=2 sw=2 et:

Deleted: nftables-flush
===================================================================
--- nftables-flush	2015-02-16 23:57:38 UTC (rev 231627)
+++ nftables-flush	2015-02-17 00:32:29 UTC (rev 231628)
@@ -1,32 +0,0 @@
-#!/bin/bash
-
-# Copyright © Sébastien Luttringer
-#
-# This program is free software; you can redistribute it and/or
-# modify it under the terms of the GNU General Public License
-# as published by the Free Software Foundation; either version 2
-# of the License, or (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
-
-PROTOS=(ip ip6 inet arp bridge)
-
-for proto in "${PROTOS[@]}"; do
-  nft list tables "$proto"|cut -f 2 -d ' '| while read table; do
-    nft flush table "$proto" "$table"
-    # Flush removes rules but not chains (contradictory to the man page). Do it manually.
-    nft list table "$proto" "$table"|awk '/^[ \t]+chain/{ print $2 }'|while read chain; do
-      nft delete chain "$proto" "$table" "$chain"
-    done
-    nft delete table "$proto" "$table"
-  done
-done
-
-# vim:set ts=2 sw=2 et:

Copied: nftables/trunk/nftables-reload (from rev 231627, nftables/trunk/nftables-flush)
===================================================================
--- nftables-reload	                        (rev 0)
+++ nftables-reload	2015-02-17 00:32:29 UTC (rev 231628)
@@ -0,0 +1,3 @@
+#!/usr/bin/nft -f
+flush ruleset
+include "/etc/nftables.conf"

Modified: nftables.service
===================================================================
--- nftables.service	2015-02-16 23:57:38 UTC (rev 231627)
+++ nftables.service	2015-02-17 00:32:29 UTC (rev 231628)
@@ -7,7 +7,8 @@
 [Service]
 Type=oneshot
 ExecStart=/usr/bin/nft -f /etc/nftables.conf
-ExecStop=/usr/lib/systemd/scripts/nftables-flush
+ExecReload=/usr/bin/nft -f /usr/lib/systemd/scripts/nftables-reload
+ExecStop=/usr/bin/nft flush ruleset
 RemainAfterExit=yes
 
 [Install]



More information about the arch-commits mailing list