summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPeter Volkov <pva@gentoo.org>2007-09-02 10:02:35 +0000
committerPeter Volkov <pva@gentoo.org>2007-09-02 10:02:35 +0000
commit55fce0bd5fff3ce0bf8b83ea09e33ef462e8225c (patch)
treea0d15caca1a5123e9c04f79757df4991912c0cf0 /net-firewall/ebtables
parentUnmask media-sound/moc since libtimidity has been keyworded on matching arches. (diff)
downloadhistorical-55fce0bd5fff3ce0bf8b83ea09e33ef462e8225c.tar.gz
historical-55fce0bd5fff3ce0bf8b83ea09e33ef462e8225c.tar.bz2
historical-55fce0bd5fff3ce0bf8b83ea09e33ef462e8225c.zip
Added init scripts into /usr/share/doc. See README.gentoo.init and bug #189315 for details. Thank Lech Perczak <lech.perczak AT multivision.pl> for report.
Package-Manager: portage-2.1.3.7
Diffstat (limited to 'net-firewall/ebtables')
-rw-r--r--net-firewall/ebtables/ChangeLog11
-rw-r--r--net-firewall/ebtables/Manifest34
-rw-r--r--net-firewall/ebtables/ebtables-2.0.6.ebuild37
-rw-r--r--net-firewall/ebtables/ebtables-2.0.8.1-r1.ebuild57
-rw-r--r--net-firewall/ebtables/files/README.gentoo.init11
-rw-r--r--net-firewall/ebtables/files/digest-ebtables-2.0.63
-rw-r--r--net-firewall/ebtables/files/digest-ebtables-2.0.8.1-r13
-rw-r--r--net-firewall/ebtables/files/ebtables.confd11
-rw-r--r--net-firewall/ebtables/files/ebtables.initd108
9 files changed, 223 insertions, 52 deletions
diff --git a/net-firewall/ebtables/ChangeLog b/net-firewall/ebtables/ChangeLog
index 3a03a31b194e..87de61aaa83b 100644
--- a/net-firewall/ebtables/ChangeLog
+++ b/net-firewall/ebtables/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for net-firewall/ebtables
# Copyright 2000-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/ebtables/ChangeLog,v 1.14 2007/08/12 10:11:21 pva Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ebtables/ChangeLog,v 1.15 2007/09/02 10:02:35 pva Exp $
+
+*ebtables-2.0.8.1-r1 (02 Sep 2007)
+
+ 02 Sep 2007; <pva@gentoo.org> +files/README.gentoo.init,
+ +files/ebtables.confd, +files/ebtables.initd, -ebtables-2.0.6.ebuild,
+ +ebtables-2.0.8.1-r1.ebuild:
+ Added init scripts into /usr/share/doc. See README.gentoo.init and bug
+ #189315 for details. Thank Lech Perczak <lech.perczak AT multivision.pl> for
+ report.
*ebtables-2.0.8.1 (12 Aug 2007)
diff --git a/net-firewall/ebtables/Manifest b/net-firewall/ebtables/Manifest
index 092cce750deb..d17a40c54379 100644
--- a/net-firewall/ebtables/Manifest
+++ b/net-firewall/ebtables/Manifest
@@ -1,3 +1,7 @@
+AUX README.gentoo.init 557 RMD160 1ad092791c090b802d7ae11cd473b731a2e7fa0a SHA1 9da25cd4385f1aa37cef8f9c4a4ca82b092ac743 SHA256 c3aea7645393bf1b9891e2dd5fac3131b2092dc961b6cc8c0c5a4e89de13d8ad
+MD5 63d5633cd26f76a6bc61f8ccfd60f7ba files/README.gentoo.init 557
+RMD160 1ad092791c090b802d7ae11cd473b731a2e7fa0a files/README.gentoo.init 557
+SHA256 c3aea7645393bf1b9891e2dd5fac3131b2092dc961b6cc8c0c5a4e89de13d8ad files/README.gentoo.init 557
AUX ebtables-2.0.6-gcc34.patch 272 RMD160 c8268bc36d0a28cef499007c2b592cfc424a1671 SHA1 be4e49f857b29ed63df495cbafc204ab639f8206 SHA256 22fb00782948060f5350c5a7f0cd0414eb4e47d688e10af93dc7b27cb9f268a4
MD5 0488ef6b4eb8aa41352527597cb5d2ad files/ebtables-2.0.6-gcc34.patch 272
RMD160 c8268bc36d0a28cef499007c2b592cfc424a1671 files/ebtables-2.0.6-gcc34.patch 272
@@ -14,34 +18,42 @@ AUX ebtables-2.0.8.1-scripts-build.patch 2628 RMD160 2d24b35c57231d06856bf6306b6
MD5 8443ec9a3253bae8f2644563e02133d7 files/ebtables-2.0.8.1-scripts-build.patch 2628
RMD160 2d24b35c57231d06856bf6306b642cc8bd1ba298 files/ebtables-2.0.8.1-scripts-build.patch 2628
SHA256 1d915fd72a90af6763009f801c7c4ef42a1deb82cd516cc09dc888b1de3f0916 files/ebtables-2.0.8.1-scripts-build.patch 2628
+AUX ebtables.confd 288 RMD160 97d8fd8a00b48d70881aff05c1fa533e1da7172b SHA1 89b16bf882290bfc31c890948245552da5b26b4d SHA256 c05a6c1ba6add3881068584074681b04bfb2ad43284d7bdd67f47f3da842de58
+MD5 80ef574ef544679290108e73d2f2f377 files/ebtables.confd 288
+RMD160 97d8fd8a00b48d70881aff05c1fa533e1da7172b files/ebtables.confd 288
+SHA256 c05a6c1ba6add3881068584074681b04bfb2ad43284d7bdd67f47f3da842de58 files/ebtables.confd 288
+AUX ebtables.initd 2380 RMD160 9cf91a08f1eeec6107c997751cacc217dc9e1e65 SHA1 f90805820a9774591d32f52e27c0893e6a496dbc SHA256 30d3c07aed4719b6041e2ccc2ba97b41edc6fa3b61b406450b6e70d3a33e922a
+MD5 d8312cb4bb8301b145e0639982e15a05 files/ebtables.initd 2380
+RMD160 9cf91a08f1eeec6107c997751cacc217dc9e1e65 files/ebtables.initd 2380
+SHA256 30d3c07aed4719b6041e2ccc2ba97b41edc6fa3b61b406450b6e70d3a33e922a files/ebtables.initd 2380
DIST ebtables-v2.0.6.tar.gz 71411 RMD160 832935fbfda5a42382ce0450ac0b1fd964eb1d7a SHA1 6a4e4ea6824440ffc5d052280eb622b5da33a065 SHA256 6b5a71790120977a96d5a468ed69987107c5079f14b0a4081f460b3b14fbf952
DIST ebtables-v2.0.8-1.tar.gz 96681 RMD160 0ff0f5aeaa418157b0e791dfbe93450ef323da51 SHA1 c70f012f274bfc277ee51f98fcffe0bfbbd36725 SHA256 e33edf08d5ae7974d3575f62468a981cc42afb1164bde3f0402e08fcfc404f74
EBUILD ebtables-2.0.6-r1.ebuild 1078 RMD160 c95ca2a0e2c6ac332fa3acb3a17d859504003ce5 SHA1 f585294c1339baf680ec76315818447746d65913 SHA256 d02473154fe73de3151a305c202a52879d1886148150a92c47464a24cca8c4d9
MD5 f46853e4836f1ca11777856105da44e8 ebtables-2.0.6-r1.ebuild 1078
RMD160 c95ca2a0e2c6ac332fa3acb3a17d859504003ce5 ebtables-2.0.6-r1.ebuild 1078
SHA256 d02473154fe73de3151a305c202a52879d1886148150a92c47464a24cca8c4d9 ebtables-2.0.6-r1.ebuild 1078
-EBUILD ebtables-2.0.6.ebuild 975 RMD160 1c3bd9098cc967739195e7598139f680c9d34c6a SHA1 2c96054eaa2082a990cfdbc19cb6a95dc4ceca43 SHA256 ac6e7706a70fb4e103cdd4ae08076f65d1e07718710540f79b2dde2992396709
-MD5 9979552c18681dd6edfe1e91f6717609 ebtables-2.0.6.ebuild 975
-RMD160 1c3bd9098cc967739195e7598139f680c9d34c6a ebtables-2.0.6.ebuild 975
-SHA256 ac6e7706a70fb4e103cdd4ae08076f65d1e07718710540f79b2dde2992396709 ebtables-2.0.6.ebuild 975
+EBUILD ebtables-2.0.8.1-r1.ebuild 1726 RMD160 bad676911536292eeb61a2e6871f4ad7d36e15ca SHA1 9ef6ae687aea232ad080a4f6d4df6ab476b9a689 SHA256 9a9439e0740cde3e0f582cffbd42cf65b854ab829c2a0ba9bcb4b84982ab12cc
+MD5 6ef8eac5573f4142aec434d5691637d1 ebtables-2.0.8.1-r1.ebuild 1726
+RMD160 bad676911536292eeb61a2e6871f4ad7d36e15ca ebtables-2.0.8.1-r1.ebuild 1726
+SHA256 9a9439e0740cde3e0f582cffbd42cf65b854ab829c2a0ba9bcb4b84982ab12cc ebtables-2.0.8.1-r1.ebuild 1726
EBUILD ebtables-2.0.8.1.ebuild 1404 RMD160 902027e877709667ec8538ca063de29dcaadaa47 SHA1 2fca8baa2a91c05b419bdfa6f0b0ca82bc6071cf SHA256 89eedbdb018df272694be78e4f1e0e8e1e86a2b013eeac5dd152061df82bd72e
MD5 138728b132ae44a6d98fcd02f086fda8 ebtables-2.0.8.1.ebuild 1404
RMD160 902027e877709667ec8538ca063de29dcaadaa47 ebtables-2.0.8.1.ebuild 1404
SHA256 89eedbdb018df272694be78e4f1e0e8e1e86a2b013eeac5dd152061df82bd72e ebtables-2.0.8.1.ebuild 1404
-MISC ChangeLog 2189 RMD160 eeacd0eb86678ef5be2e9abe30c83b62aaa93f8a SHA1 c476c143692662cffa426aaa28596623222622af SHA256 b3ebfdb70f392a9c4b6c92f5faebb632bf4baf77a81b44213a5a9cfea7534ec4
-MD5 e7ef13d8101770952ed930a55e1b9055 ChangeLog 2189
-RMD160 eeacd0eb86678ef5be2e9abe30c83b62aaa93f8a ChangeLog 2189
-SHA256 b3ebfdb70f392a9c4b6c92f5faebb632bf4baf77a81b44213a5a9cfea7534ec4 ChangeLog 2189
+MISC ChangeLog 2550 RMD160 35d928a54a6e42fabf95ae17aaaa1773dbf7ef32 SHA1 046220b42101149dec02b3b4d7914fc1457c6a4e SHA256 fcbcd9fd46eb0e9a9d639b809d04974ac18616cefa2138a356b8dc4eff418eed
+MD5 603bb5a8dcd055bf48f1a3bdd7d5222a ChangeLog 2550
+RMD160 35d928a54a6e42fabf95ae17aaaa1773dbf7ef32 ChangeLog 2550
+SHA256 fcbcd9fd46eb0e9a9d639b809d04974ac18616cefa2138a356b8dc4eff418eed ChangeLog 2550
MISC metadata.xml 251 RMD160 2acabb95dba06572ab5dfd2a6d7bca5ab53d7a64 SHA1 6bf96c40f48fb4f92026dd80b7b3e1ce7ebdc9d1 SHA256 8d646b2f01acd31f9bc065850081adfa7f1dfabd8e305e05331fc6d21cbbd504
MD5 26ae4c6a179a2e2cc5c19c56e978861d metadata.xml 251
RMD160 2acabb95dba06572ab5dfd2a6d7bca5ab53d7a64 metadata.xml 251
SHA256 8d646b2f01acd31f9bc065850081adfa7f1dfabd8e305e05331fc6d21cbbd504 metadata.xml 251
-MD5 10aca2434836b1c3a10c639838101578 files/digest-ebtables-2.0.6 244
-RMD160 6cdb583c3a517500fe78b5911707723091f90090 files/digest-ebtables-2.0.6 244
-SHA256 24df33cfa531bd07d2591bf5e0b08638abeff981c0186557592e12ac33a1e118 files/digest-ebtables-2.0.6 244
MD5 10aca2434836b1c3a10c639838101578 files/digest-ebtables-2.0.6-r1 244
RMD160 6cdb583c3a517500fe78b5911707723091f90090 files/digest-ebtables-2.0.6-r1 244
SHA256 24df33cfa531bd07d2591bf5e0b08638abeff981c0186557592e12ac33a1e118 files/digest-ebtables-2.0.6-r1 244
MD5 c81b75dddac491771c6b189a3cb7a593 files/digest-ebtables-2.0.8.1 250
RMD160 2fec252859b3a19da36ce94a85ddffe2562c79e0 files/digest-ebtables-2.0.8.1 250
SHA256 cfb0bea2dc82ea6eb4a6f1879d783c62f683350662f4218fa3f592816fbdd630 files/digest-ebtables-2.0.8.1 250
+MD5 c81b75dddac491771c6b189a3cb7a593 files/digest-ebtables-2.0.8.1-r1 250
+RMD160 2fec252859b3a19da36ce94a85ddffe2562c79e0 files/digest-ebtables-2.0.8.1-r1 250
+SHA256 cfb0bea2dc82ea6eb4a6f1879d783c62f683350662f4218fa3f592816fbdd630 files/digest-ebtables-2.0.8.1-r1 250
diff --git a/net-firewall/ebtables/ebtables-2.0.6.ebuild b/net-firewall/ebtables/ebtables-2.0.6.ebuild
deleted file mode 100644
index 68d0eb5bdd48..000000000000
--- a/net-firewall/ebtables/ebtables-2.0.6.ebuild
+++ /dev/null
@@ -1,37 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/net-firewall/ebtables/ebtables-2.0.6.ebuild,v 1.11 2005/06/08 02:14:47 solar Exp $
-
-inherit eutils toolchain-funcs
-
-MY_P="${PN}-v${PV}"
-
-DESCRIPTION="Utility that enables basic Ethernet frame filtering on a Linux bridge, MAC NAT and brouting."
-SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
-HOMEPAGE="http://ebtables.sourceforge.net/"
-KEYWORDS="x86 ~ppc ~amd64"
-IUSE=""
-LICENSE="GPL-2"
-SLOT="0"
-
-S="${WORKDIR}/${MY_P}"
-
-DEPEND="virtual/libc"
-
-src_compile() {
- emake CC="$(tc-getCC)" || die "emake failed"
-}
-
-src_unpack() {
- unpack ${A}
- cd ${S}
-
- # fix "label at end of compound statement" error that
- # prevents ebtables from being compilable with >=gcc-3.4
- epatch ${FILESDIR}/ebtables-2.0.6-gcc34.patch
-}
-
-src_install() {
- dodir /sbin/
- einstall MANDIR=${D}/usr/share/man ETHERTYPESPATH=${D}/etc/ BINPATH=${D}/sbin/ || die
-}
diff --git a/net-firewall/ebtables/ebtables-2.0.8.1-r1.ebuild b/net-firewall/ebtables/ebtables-2.0.8.1-r1.ebuild
new file mode 100644
index 000000000000..0edc61c0b328
--- /dev/null
+++ b/net-firewall/ebtables/ebtables-2.0.8.1-r1.ebuild
@@ -0,0 +1,57 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ebtables/ebtables-2.0.8.1-r1.ebuild,v 1.1 2007/09/02 10:02:35 pva Exp $
+
+inherit versionator eutils toolchain-funcs multilib
+
+MY_PV=$(replace_version_separator 3 '-' )
+MY_P="${PN}-v${MY_PV}"
+
+DESCRIPTION="Utility that enables basic Ethernet frame filtering on a Linux bridge, MAC NAT and brouting."
+SRC_URI="mirror://sourceforge/${PN}/${MY_P}.tar.gz"
+HOMEPAGE="http://ebtables.sourceforge.net/"
+KEYWORDS="~amd64 ~ppc ~x86"
+IUSE=""
+LICENSE="GPL-2"
+SLOT="0"
+
+S="${WORKDIR}/${MY_P}"
+
+DEPEND="virtual/libc"
+
+src_unpack() {
+ unpack ${A}
+ cd "${S}"
+
+ # Kill two rabits: TEXTREL and compilation on amd64. bug #159371.
+ epatch "${FILESDIR}"/${P}-fix-textrel.patch
+
+ # Fix scripts to be built during make, thus paths inside are correct.
+ epatch "${FILESDIR}"/${P}-scripts-build.patch
+
+ sed -i -e "s,MANDIR:=/usr/local/man,MANDIR:=/usr/share/man," \
+ -e "s,BINDIR:=/usr/local/sbin,BINDIR:=/sbin," \
+ -e "s,INITDIR:=/etc/rc.d/init.d,INITDIR:=/usr/share/doc/${PF}," \
+ -e "s,SYSCONFIGDIR:=/etc/sysconfig,SYSCONFIGDIR:=/usr/share/doc/${PF}," \
+ -e "s,LIBDIR:=/usr/lib,LIBDIR:=/$(get_libdir)/\$(PROGNAME)," Makefile
+}
+
+src_compile() {
+ emake CC="$(tc-getCC)" || die "emake failed"
+}
+
+src_install() {
+ dodoc ChangeLog THANKS
+ make DESTDIR="${D}" install || die
+
+ insinto /usr/share/doc/${PF}/init-scripts
+ doins "${FILESDIR}"/{ebtables.confd,ebtables.initd,README.gentoo.init}
+}
+
+pkg_postinst() {
+ echo
+ einfo "If you are interested in gentoo init script for ebtables, please,"
+ einfo "read the following file:"
+ einfo "/usr/share/doc/${PF}/init-scripts/README.gentoo.init"
+ echo
+}
diff --git a/net-firewall/ebtables/files/README.gentoo.init b/net-firewall/ebtables/files/README.gentoo.init
new file mode 100644
index 000000000000..1fc6b180b772
--- /dev/null
+++ b/net-firewall/ebtables/files/README.gentoo.init
@@ -0,0 +1,11 @@
+ebtables.initd and ebtables.confd are init script and its configuration file.
+
+If you want to use this run the following commands:
+# cd /usr/share/doc/ebtables*/init-scripts
+# cp ebtables.initd /etc/init.d/ebtables
+# cp ebtables.confd /etc/conf.d/ebtables
+
+Note: we are not suppling them by default and you have to put them into
+/etc/{init.d,conf.d} directories by yourself as they are NOT working in case
+ebtables kernel components are NOT built as modules. If you build ebtables
+kernel components as modules they should work. See bugs.gentoo.org/189315 .
diff --git a/net-firewall/ebtables/files/digest-ebtables-2.0.6 b/net-firewall/ebtables/files/digest-ebtables-2.0.6
deleted file mode 100644
index 295a220302db..000000000000
--- a/net-firewall/ebtables/files/digest-ebtables-2.0.6
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 c4559af2366c764c6c42a3fdd40d60d3 ebtables-v2.0.6.tar.gz 71411
-RMD160 832935fbfda5a42382ce0450ac0b1fd964eb1d7a ebtables-v2.0.6.tar.gz 71411
-SHA256 6b5a71790120977a96d5a468ed69987107c5079f14b0a4081f460b3b14fbf952 ebtables-v2.0.6.tar.gz 71411
diff --git a/net-firewall/ebtables/files/digest-ebtables-2.0.8.1-r1 b/net-firewall/ebtables/files/digest-ebtables-2.0.8.1-r1
new file mode 100644
index 000000000000..1d64e3bc0cbc
--- /dev/null
+++ b/net-firewall/ebtables/files/digest-ebtables-2.0.8.1-r1
@@ -0,0 +1,3 @@
+MD5 216e5d20fbd0e56dbe7e56b0d07b1909 ebtables-v2.0.8-1.tar.gz 96681
+RMD160 0ff0f5aeaa418157b0e791dfbe93450ef323da51 ebtables-v2.0.8-1.tar.gz 96681
+SHA256 e33edf08d5ae7974d3575f62468a981cc42afb1164bde3f0402e08fcfc404f74 ebtables-v2.0.8-1.tar.gz 96681
diff --git a/net-firewall/ebtables/files/ebtables.confd b/net-firewall/ebtables/files/ebtables.confd
new file mode 100644
index 000000000000..645b26edae99
--- /dev/null
+++ b/net-firewall/ebtables/files/ebtables.confd
@@ -0,0 +1,11 @@
+# /etc/conf.d/ebtables
+
+# Location in which ebtables initscript will save set rules on
+# service shutdown
+EBTABLES_SAVE="/var/lib/ebtables/rules-save"
+
+# Options to pass to ebtables-save and ebtables-restore
+SAVE_RESTORE_OPTIONS=""
+
+# Save state on stopping ebtables
+SAVE_ON_STOP="yes"
diff --git a/net-firewall/ebtables/files/ebtables.initd b/net-firewall/ebtables/files/ebtables.initd
new file mode 100644
index 000000000000..05ca7dbcaed2
--- /dev/null
+++ b/net-firewall/ebtables/files/ebtables.initd
@@ -0,0 +1,108 @@
+#!/sbin/runscript
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-firewall/ebtables/files/ebtables.initd,v 1.1 2007/09/02 10:02:35 pva Exp $
+
+opts="save reload panic"
+
+ebtables_bin="/sbin/ebtables"
+ebtables_save=${EBTABLES_SAVE}
+ebtables_tables=$(grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//)
+if [ ebtables_tables == "" ] ; then
+ ebtables_tables="filter nat broute"
+fi
+
+depend() {
+ before net
+ use logger
+}
+
+set_table_policy() {
+ local chains table=$1 policy=$2
+ case ${table} in
+ nat) chains="PREROUTING POSTROUTING OUTPUT";;
+ broute) chains="BROUTING";;
+ filter) chains="INPUT FORWARD OUTPUT";;
+ *) chains="";;
+ esac
+ local chain
+ for chain in ${chains} ; do
+ ${ebtables_bin} -t ${table} -P ${chain} ${policy}
+ done
+}
+
+checkkernel() {
+ if [ "$(grep -E '^ebtable_' /proc/modules | cut -f1 -d' ' | sed s/ebtable_//)" == "" ] ; then
+ eerror "Your kernel lacks ebtables support, please load"
+ eerror "appropriate modules and try again."
+ return 1
+ fi
+ return 0
+}
+checkconfig() {
+ if [ ! -f ${ebtables_save} ] ; then
+ eerror "Not starting ebtables. First create some rules then run:"
+ eerror "/etc/init.d/ebtables save"
+ return 1
+ fi
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Loading ebtables state and starting bridge firewall"
+ ${ebtables_bin}-restore ${SAVE_RESTORE_OPTIONS} < "${ebtables_save}"
+ eend $?
+}
+
+stop() {
+ if [ "${SAVE_ON_STOP}" = "yes" ] ; then
+ save || return 1
+ fi
+ checkkernel || return 1
+ ebegin "Stopping bridge firewall"
+ local a
+ for a in ${ebtables_tables}; do
+ set_table_policy $a ACCEPT
+
+ ${ebtables_bin} -t $a -F
+ ${ebtables_bin} -t $a -X
+ done
+ eend $?
+}
+
+reload() {
+ checkkernel || return 1
+ ebegin "Flushing bridge firewall"
+ local a
+ for a in ${ebtables_tables}; do
+ ${ebtables_bin} -t $a -F
+ ${ebtables_bin} -t $a -X
+ done
+ eend $?
+
+ start
+}
+
+save() {
+ ebegin "Saving ebtables state"
+ touch "${ebtables_save}"
+ chmod 0600 "${ebtables_save}"
+ ${ebtables_bin}-save ${SAVE_RESTORE_OPTIONS} > "${ebtables_save}"
+ eend $?
+}
+
+panic() {
+ checkkernel || return 1
+ service_started ebtables && svc_stop
+
+ local a
+ ebegin "Dropping all packets forwarded on bridges"
+ for a in ${ebtables_tables}; do
+ ${ebtables_bin} -t $a -X
+ ${ebtables_bin} -t $a -X
+
+ set_table_policy $a DROP
+ done
+ eend $?
+}