rpms/arptables_jf/devel arptables_jf-0.0.8-initscript.patch,1.2,1.3

Jiri Skala jskala at fedoraproject.org
Thu Jan 28 10:02:48 UTC 2010


Author: jskala

Update of /cvs/extras/rpms/arptables_jf/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv452

Modified Files:
	arptables_jf-0.0.8-initscript.patch 
Log Message:
* Fri Jan 22 2010 Jiri Skala <jskala at redhat.com> - 0.0.8-17
- moved header patch from sources to cvs
- fixes merge review findings #225255


arptables_jf-0.0.8-initscript.patch:
 arptables.init |  214 +++++++++++++++++++++++++++++++--------------------------
 1 file changed, 117 insertions(+), 97 deletions(-)

Index: arptables_jf-0.0.8-initscript.patch
===================================================================
RCS file: /cvs/extras/rpms/arptables_jf/devel/arptables_jf-0.0.8-initscript.patch,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -p -r1.2 -r1.3
--- arptables_jf-0.0.8-initscript.patch	25 Feb 2008 15:02:40 -0000	1.2
+++ arptables_jf-0.0.8-initscript.patch	28 Jan 2010 10:02:48 -0000	1.3
@@ -1,6 +1,6 @@
 diff -up arptables_jf-0.0.8/arptables.init.initscript arptables_jf-0.0.8/arptables.init
 --- arptables_jf-0.0.8/arptables.init.initscript	2003-06-27 18:10:15.000000000 +0200
-+++ arptables_jf-0.0.8/arptables.init	2008-02-25 16:01:38.000000000 +0100
++++ arptables_jf-0.0.8/arptables.init	2010-01-28 09:47:09.744668584 +0100
 @@ -1,8 +1,20 @@
  #!/bin/sh
  #
@@ -23,32 +23,47 @@ diff -up arptables_jf-0.0.8/arptables.in
  #
  # description: Automates a packet filtering firewall with arptables.
  #
-@@ -21,17 +33,19 @@
+@@ -20,20 +32,6 @@
+ 
  ARPTABLES_CONFIG=/etc/sysconfig/arptables
  
- if [ ! -x /sbin/arptables ]; then
+-if [ ! -x /sbin/arptables ]; then
 -	exit 0
-+	exit 4
- fi
- 
- KERNELMAJ=`uname -r | sed                   -e 's,\..*,,'`
- KERNELMIN=`uname -r | sed -e 's,[^\.]*\.,,' -e 's,\..*,,'`
- 
- if [ "$KERNELMAJ" -lt 2 ] ; then
+-fi
+-
+-KERNELMAJ=`uname -r | sed                   -e 's,\..*,,'`
+-KERNELMIN=`uname -r | sed -e 's,[^\.]*\.,,' -e 's,\..*,,'`
+-
+-if [ "$KERNELMAJ" -lt 2 ] ; then
 -	exit 0
-+	echo "Not supported for kernel $KERNELMAJ.$KERNELMIN"
-+	exit 1
- fi
- if [ "$KERNELMAJ" -eq 2 -a "$KERNELMIN" -lt 3 ] ; then
+-fi
+-if [ "$KERNELMAJ" -eq 2 -a "$KERNELMIN" -lt 3 ] ; then
 -	exit 0
-+	echo "Not supported for kernel $KERNELMAJ.$KERNELMIN"
-+	exit 1
- fi
- 
+-fi
+-
  arp_table() {
-@@ -42,97 +56,104 @@ arp_table() {
+ 	if fgrep -qsx $1 /proc/net/arp_tables_names; then
+ 		arptables -t "$@"
+@@ -41,98 +39,121 @@ arp_table() {
+ }
  
  start() {
++	if [ ! -x /sbin/arptables ]; then
++		exit 4
++	fi
++
++	KERNELMAJ=`uname -r | sed                   -e 's,\..*,,'`
++	KERNELMIN=`uname -r | sed -e 's,[^\.]*\.,,' -e 's,\..*,,'`
++
++	if [ "$KERNELMAJ" -lt 2 ] ; then
++		echo "Not supported for kernel $KERNELMAJ.$KERNELMIN"
++		exit 1
++	fi
++	if [ "$KERNELMAJ" -eq 2 -a "$KERNELMIN" -lt 3 ] ; then
++		echo "Not supported for kernel $KERNELMAJ.$KERNELMIN"
++		exit 1
++	fi
++
  	# don't do squat if we don't have the config file
 +	echo -n $"Starting arptables_jf"
  	if [ -f $ARPTABLES_CONFIG ]; then
@@ -195,7 +210,7 @@ diff -up arptables_jf-0.0.8/arptables.in
  	;;
  
 -  restart)
-+restart)
++restart|reload)
  	# "restart" is really just "start" as this isn't a daemon,
 -	#  and "start" clears any pre-defined rules anyway.
 -	#  This is really only here to make those who expect it happy
@@ -227,11 +242,6 @@ diff -up arptables_jf-0.0.8/arptables.in
 -	    success || failure
 +		arp_table filter -P OUT DROP && \
 +		success || failure
-+	echo
-+	echo -n "Flushing all chains:"
-+	arp_table filter -F IN && \
-+		arp_table filter -F OUT && \
-+		success || failure
  	echo
 -    echo -n "Flushing all chains:"
 -        arp_table filter -F IN && \
@@ -243,6 +253,11 @@ diff -up arptables_jf-0.0.8/arptables.in
 -                success || failure
 -    echo
 -        ;;
++	echo -n "Flushing all chains:"
++	arp_table filter -F IN && \
++		arp_table filter -F OUT && \
++		success || failure
++	echo
 +	echo -n "Removing user defined chains:"
 +	arp_table filter -X && \
 +		success || failure
@@ -259,9 +274,11 @@ diff -up arptables_jf-0.0.8/arptables.in
  	;;
  
 -  *)
+-	echo $"Usage: $0 {start|stop|restart|condrestart|status|panic|save}"
+-	exit 1
 +*)
- 	echo $"Usage: $0 {start|stop|restart|condrestart|status|panic|save}"
- 	exit 1
++	echo $"Usage: $0 {start|stop|restart|condrestart|reload|status|panic|save}"
++	exit 2
  esac
  
  exit 0



More information about the scm-commits mailing list