diff options
author | 2004-10-02 18:44:02 +0000 | |
---|---|---|
committer | 2004-10-02 18:44:02 +0000 | |
commit | 0e89aac9a44e6fdddbca30382526e633534b2fb5 (patch) | |
tree | 814ffebadd90d4c68993cc91102219670689de66 /net-firewall/firehol/files | |
parent | Keyword ~alpha, requested in bug 64485. (diff) | |
download | historical-0e89aac9a44e6fdddbca30382526e633534b2fb5.tar.gz historical-0e89aac9a44e6fdddbca30382526e633534b2fb5.tar.bz2 historical-0e89aac9a44e6fdddbca30382526e633534b2fb5.zip |
New -r2 with enhanced init-script and updated metadata.xml.
Diffstat (limited to 'net-firewall/firehol/files')
-rw-r--r-- | net-firewall/firehol/files/digest-firehol-1.191-r2 | 1 | ||||
-rw-r--r-- | net-firewall/firehol/files/firehol.conf.d | 2 | ||||
-rw-r--r-- | net-firewall/firehol/files/firehol.initrd | 52 |
3 files changed, 50 insertions, 5 deletions
diff --git a/net-firewall/firehol/files/digest-firehol-1.191-r2 b/net-firewall/firehol/files/digest-firehol-1.191-r2 new file mode 100644 index 000000000000..a3a8578a11c7 --- /dev/null +++ b/net-firewall/firehol/files/digest-firehol-1.191-r2 @@ -0,0 +1 @@ +MD5 29ce4e88059c9bd408711803a569a492 firehol-1.191.tar.bz2 105623 diff --git a/net-firewall/firehol/files/firehol.conf.d b/net-firewall/firehol/files/firehol.conf.d new file mode 100644 index 000000000000..c8b06e0eaf09 --- /dev/null +++ b/net-firewall/firehol/files/firehol.conf.d @@ -0,0 +1,2 @@ +#Locate of FireHOL conf file +FIREHOL_CONF="/etc/firehol/firehol.conf" diff --git a/net-firewall/firehol/files/firehol.initrd b/net-firewall/firehol/files/firehol.initrd index 858441a92bb0..8ea6b4d99efa 100644 --- a/net-firewall/firehol/files/firehol.initrd +++ b/net-firewall/firehol/files/firehol.initrd @@ -1,24 +1,66 @@ #!/sbin/runscript # Copyright 1999-2004 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/net-firewall/firehol/files/firehol.initrd,v 1.2 2004/07/14 23:28:26 agriffis Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-firewall/firehol/files/firehol.initrd,v 1.3 2004/10/02 18:44:02 centic Exp $ -opts="start stop" + +opts="start stop restart try status panic save" depend() { - need net + before net provide firewall } +checkrules() { + if [ ! -f ${FIREHOL_CONF} ]; then + eerror "Not starting FireHOL. Create ${FIREHOL_CONF}" + eerror "and fill it with some rules." + eerror "man firehol.conf for more info." + return 1 + fi +} + start() { + checkrules || return 1 ebegin "Starting FireHOL" - /usr/sbin/firehol start 1>/dev/null + /usr/sbin/firehol start ${FIREHOL_CONF} > /dev/null eend $? } stop() { ebegin "Stopping FireHOL" - /usr/sbin/firehol stop 1>/dev/null + /usr/sbin/firehol stop > /dev/null + eend $? +} + +restart() { + ebegin "Restarting Firewall" + svc_stop; + svc_start; + eend $? +} + + +try() { + ebegin "Trying FireHOL configuration" + /usr/sbin/firehol try eend $? } +status() { + ebegin "Showing FireHOL status" + /usr/sbin/firehol status + eend $? +} + +panic() { + ebegin "FireHOL PANIC" + /usr/sbin/firehol panic + eend $? +} + +save() { + ebegin "Saving FireHOL configuration" + /usr/sbin/firehol save + eend $? +} |