summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDiego Elio Pettenò <flameeyes@gentoo.org>2006-04-14 15:26:29 +0000
committerDiego Elio Pettenò <flameeyes@gentoo.org>2006-04-14 15:26:29 +0000
commitaf67aa71c017b25937f5e37c0ca8a22d99f3e00e (patch)
treea2e3873421df60a64764f68d5e8d7393191916b5 /sys-freebsd/freebsd-pf
parentUpdated madwifi USE flags. (diff)
downloadgentoo-2-af67aa71c017b25937f5e37c0ca8a22d99f3e00e.tar.gz
gentoo-2-af67aa71c017b25937f5e37c0ca8a22d99f3e00e.tar.bz2
gentoo-2-af67aa71c017b25937f5e37c0ca8a22d99f3e00e.zip
Add init script for pf, based on the one contributed by Robert Sebastian Gerus in bug #129171.
(Portage version: 2.1_pre7-r5)
Diffstat (limited to 'sys-freebsd/freebsd-pf')
-rw-r--r--sys-freebsd/freebsd-pf/ChangeLog9
-rw-r--r--sys-freebsd/freebsd-pf/Manifest28
-rw-r--r--sys-freebsd/freebsd-pf/files/digest-freebsd-pf-6.0-r1 (renamed from sys-freebsd/freebsd-pf/files/digest-freebsd-pf-6.0)0
-rw-r--r--sys-freebsd/freebsd-pf/files/pf.confd10
-rwxr-xr-xsys-freebsd/freebsd-pf/files/pf.initd50
-rw-r--r--sys-freebsd/freebsd-pf/freebsd-pf-6.0-r1.ebuild (renamed from sys-freebsd/freebsd-pf/freebsd-pf-6.0.ebuild)7
6 files changed, 85 insertions, 19 deletions
diff --git a/sys-freebsd/freebsd-pf/ChangeLog b/sys-freebsd/freebsd-pf/ChangeLog
index 3e61d0350501..aed1070eb5be 100644
--- a/sys-freebsd/freebsd-pf/ChangeLog
+++ b/sys-freebsd/freebsd-pf/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for sys-freebsd/freebsd-pf
# Copyright 1999-2006 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pf/ChangeLog,v 1.3 2006/04/04 07:18:52 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pf/ChangeLog,v 1.4 2006/04/14 15:26:29 flameeyes Exp $
+
+*freebsd-pf-6.0-r1 (14 Apr 2006)
+
+ 14 Apr 2006; Diego Pettenò <flameeyes@gentoo.org> +files/pf.confd,
+ +files/pf.initd, -freebsd-pf-6.0.ebuild, +freebsd-pf-6.0-r1.ebuild:
+ Add init script for pf, based on the one contributed by Robert Sebastian
+ Gerus in bug #129171.
04 Apr 2006; Diego Pettenò <flameeyes@gentoo.org> freebsd-pf-6.0.ebuild:
Add dependency over libpcap.
diff --git a/sys-freebsd/freebsd-pf/Manifest b/sys-freebsd/freebsd-pf/Manifest
index e9d1bd66f29b..34239cabdeab 100644
--- a/sys-freebsd/freebsd-pf/Manifest
+++ b/sys-freebsd/freebsd-pf/Manifest
@@ -1,25 +1,21 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
MD5 89ff29c6d8694d475f3450e5f24d6505 ChangeLog 927
RMD160 1067970c84e0e7b86ba94245ad1d1de988f681a0 ChangeLog 927
SHA256 a0b1ea17b98460a8a3e8a1f767c616c68b11d4f4bcf781169339f95640ec15cf ChangeLog 927
-MD5 85901762b1b5797d4c97aa0cdd7be3e1 files/digest-freebsd-pf-6.0 1295
-RMD160 dfaa6acbcc3a5282d41b3204342dda0e0c906fa8 files/digest-freebsd-pf-6.0 1295
-SHA256 24290e8449f22ded1c68fe86e421e332e96d5dc384d37a79b93aa68cbb8d2b60 files/digest-freebsd-pf-6.0 1295
+MD5 85901762b1b5797d4c97aa0cdd7be3e1 files/digest-freebsd-pf-6.0-r1 1295
+RMD160 dfaa6acbcc3a5282d41b3204342dda0e0c906fa8 files/digest-freebsd-pf-6.0-r1 1295
+SHA256 24290e8449f22ded1c68fe86e421e332e96d5dc384d37a79b93aa68cbb8d2b60 files/digest-freebsd-pf-6.0-r1 1295
MD5 2d3b83d198f4bde2c2f5c838be5ed0f1 files/freebsd-pf-6.0-pcap.patch 556
RMD160 ddb0733e487a7ba4eecedc82bc95695cb397f072 files/freebsd-pf-6.0-pcap.patch 556
SHA256 1bef4f28c77386d50712dd8d5579d0dfcd4ef24b2a730597bdcfc4218fe70017 files/freebsd-pf-6.0-pcap.patch 556
-MD5 a93954d26404a8418890d1539e7d85c9 freebsd-pf-6.0.ebuild 1311
-RMD160 0b9ee2e57686adfa0460656c5e7a5e8613b9fcfa freebsd-pf-6.0.ebuild 1311
-SHA256 71292e546f73f095a0b8bb8af66e86af4a68ec9b8ec586a71748a56825ea066c freebsd-pf-6.0.ebuild 1311
+MD5 e410ceaa9c12f3a282345eefd61d121c files/pf.confd 291
+RMD160 5dfc931d60ea47e22fb4467afb5204a30c707e66 files/pf.confd 291
+SHA256 5371eeda7632a97d070a8c312deaae1f4ab1e4853e129a3bae8499e83b6c4a3a files/pf.confd 291
+MD5 963cc556dd891647d484887841b28391 files/pf.initd 819
+RMD160 df8271bdc1fe03d696488c98df9b31951441e13f files/pf.initd 819
+SHA256 c679db12d154daa0e7538b82b2eb0b24356385ce21b2fdf5480d44c038e83f91 files/pf.initd 819
+MD5 6dca01ae84b8d539f1a01023b0835d84 freebsd-pf-6.0-r1.ebuild 1371
+RMD160 ac698971174c158ed582d99152cb11f5ae2eb57d freebsd-pf-6.0-r1.ebuild 1371
+SHA256 f0631f8009727b344daf4fd5dfbff9891b1e30e952e3436dc78d158ed97afb70 freebsd-pf-6.0-r1.ebuild 1371
MD5 2bd48a5ae413433cbb36110b219ce97c metadata.xml 156
RMD160 60b5820a08275f307e5bd936d78f5afd1f141086 metadata.xml 156
SHA256 30ab515d6ac492d3d6c36ac3c675511742c2149e56a6b3228c8d22ab8edb3ff7 metadata.xml 156
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.2.2 (GNU/Linux)
-
-iD8DBQFEMh3+AiZjviIA2XgRArzGAJ9kh6ay0OW+goSe05QbkHem/tw+hQCg5LWN
-TtzHBvoQ3NrmVBGI6foutmc=
-=ex2n
------END PGP SIGNATURE-----
diff --git a/sys-freebsd/freebsd-pf/files/digest-freebsd-pf-6.0 b/sys-freebsd/freebsd-pf/files/digest-freebsd-pf-6.0-r1
index 483a1c1a27c7..483a1c1a27c7 100644
--- a/sys-freebsd/freebsd-pf/files/digest-freebsd-pf-6.0
+++ b/sys-freebsd/freebsd-pf/files/digest-freebsd-pf-6.0-r1
diff --git a/sys-freebsd/freebsd-pf/files/pf.confd b/sys-freebsd/freebsd-pf/files/pf.confd
new file mode 100644
index 000000000000..41c2fb9e5ba9
--- /dev/null
+++ b/sys-freebsd/freebsd-pf/files/pf.confd
@@ -0,0 +1,10 @@
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pf/files/pf.confd,v 1.1 2006/04/14 15:26:29 flameeyes Exp $
+
+# Defines where the rules file is found, by default /etc/pf.conf
+PF_RULES_FILE=/etc/pf.conf
+
+# Extra options to pass to pfctl when loading the rules
+# See pfctl(8)
+# PF_OPTS=
diff --git a/sys-freebsd/freebsd-pf/files/pf.initd b/sys-freebsd/freebsd-pf/files/pf.initd
new file mode 100755
index 000000000000..221c654b29c2
--- /dev/null
+++ b/sys-freebsd/freebsd-pf/files/pf.initd
@@ -0,0 +1,50 @@
+#!/sbin/runscript
+# Copyright 2006 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pf/files/pf.initd,v 1.1 2006/04/14 15:26:29 flameeyes Exp $
+
+depend() {
+ need net
+}
+
+checkconfig() {
+ if ! [[ -c /dev/pf ]]; then
+ ewarn "Pseudo-device /dev/pf not found."
+
+ ebegin "Loading pf module"
+ if ! kldload pf; then
+ eerror "Unable to load pf module."
+ eend 1
+ return 1
+ fi
+ eend $?
+
+ if ! [[ -c /dev/pf ]]; then
+ eerror "Pseudo-device /dev/pf still not found."
+ return 1
+ fi
+ fi
+
+ return 0
+}
+
+start() {
+ checkconfig || return 1
+
+ einfo "Starting firewall"
+
+ if [ -r "${PF_RULES_FILE}" ]; then
+ einfo "Loading firewall rules"
+ /sbin/pfctl -qe -f ${PF_RULES_FILE:-/etc/pf.conf} ${PF_OPTS}
+ else
+ /sbin/pfctl -qe ${PF_OPTS}
+ fi
+
+ eend $?
+}
+
+stop() {
+ einfo "Stopping firewall"
+ /sbin/pfctl -qd || retval=1
+ eend $?
+}
diff --git a/sys-freebsd/freebsd-pf/freebsd-pf-6.0.ebuild b/sys-freebsd/freebsd-pf/freebsd-pf-6.0-r1.ebuild
index ea6d128ec711..18f1a0bd650a 100644
--- a/sys-freebsd/freebsd-pf/freebsd-pf-6.0.ebuild
+++ b/sys-freebsd/freebsd-pf/freebsd-pf-6.0-r1.ebuild
@@ -1,8 +1,8 @@
# Copyright 1999-2006 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pf/freebsd-pf-6.0.ebuild,v 1.3 2006/04/04 07:18:52 flameeyes Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-freebsd/freebsd-pf/freebsd-pf-6.0-r1.ebuild,v 1.1 2006/04/14 15:26:29 flameeyes Exp $
-inherit bsdmk freebsd flag-o-matic
+inherit bsdmk freebsd
DESCRIPTION="FreeBSD's base system libraries"
SLOT="0"
@@ -53,4 +53,7 @@ src_install() {
cd ${WORKDIR}/etc
insinto /etc
doins pf.conf pf.os
+
+ newinitd "${FILESDIR}/pf.initd" pf
+ newconfd "${FILESDIR}/pf.confd" pf
}