[arptables PATCH] arptables: cleanup sysvinit script

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



This file belong to downstream distributions. Also, it's unmaintained.

Signed-off-by: Arturo Borrero Gonzalez <arturo@xxxxxxxxxxxxx>
---
 Makefile       |    8 +---
 arptables.sysv |  103 --------------------------------------------------------
 2 files changed, 2 insertions(+), 109 deletions(-)
 delete mode 100644 arptables.sysv

diff --git a/Makefile b/Makefile
index 7bead0d..139c9ca 100644
--- a/Makefile
+++ b/Makefile
@@ -7,7 +7,6 @@ LIBDIR:=$(PREFIX)/lib
 BINDIR:=$(PREFIX)/sbin
 MANDIR:=$(PREFIX)/man
 man8dir=$(MANDIR)/man8
-INITDIR:=/etc/rc.d/init.d
 SYSCONFIGDIR:=/etc/sysconfig
 DESTDIR:=
 
@@ -46,15 +45,12 @@ $(DESTDIR)$(BINDIR)/arptables: arptables
 tmp1:=$(shell printf $(BINDIR) | sed 's/\//\\\//g')
 tmp2:=$(shell printf $(SYSCONFIGDIR) | sed 's/\//\\\//g')
 .PHONY: scripts
-scripts: arptables-save arptables-restore arptables.sysv
+scripts: arptables-save arptables-restore
 	cat arptables-save | sed 's/__EXEC_PATH__/$(tmp1)/g' > arptables-save_
 	install -m 0755 arptables-save_ $(DESTDIR)$(BINDIR)/arptables-save
 	cat arptables-restore | sed 's/__EXEC_PATH__/$(tmp1)/g' > arptables-restore_
 	install -m 0755 arptables-restore_ $(DESTDIR)$(BINDIR)/arptables-restore
-	cat arptables.sysv | sed 's/__EXEC_PATH__/$(tmp1)/g' | sed 's/__SYSCONFIG__/$(tmp2)/g' > arptables.sysv_
-	if [ "$(DESTDIR)" != "" ]; then mkdir -p $(DESTDIR)$(INITDIR); fi
-	if test -d $(DESTDIR)$(INITDIR); then install -m 0755 arptables.sysv_ $(DESTDIR)$(INITDIR)/arptables; fi
-	rm -f arptables-save_ arptables-restore_ arptables.sysv_
+	rm -f arptables-save_ arptables-restore_
 
 .PHONY: install-man
 install-man: $(MANS)
diff --git a/arptables.sysv b/arptables.sysv
deleted file mode 100644
index ea5cf09..0000000
--- a/arptables.sysv
+++ /dev/null
@@ -1,103 +0,0 @@
-#!/bin/bash
-#
-# init script for arptables
-#
-# Original by Dag Wieers <dag@xxxxxxxxxx>.
-# Modified/changed to arptables by
-# 	Rok Papez <rok.papez@xxxxxxxx>.
-#
-# chkconfig: - 16 84
-# description: Arp filtering tables
-#
-# config: __SYSCONFIG__/arptables
-
-source /etc/init.d/functions
-source /etc/sysconfig/network
-
-# Check that networking is up.
-[ ${NETWORKING} = "no" ] && exit 0
-
-[ -x __EXEC_PATH__/arptables ] || exit 1
-[ -x __EXEC_PATH__/arptables-save ] || exit 1
-[ -x __EXEC_PATH__/arptables-restore ] || exit 1
-
-[ "$1" != "save" -o -r __SYSCONFIG__/arptables ] || exit 1
-
-RETVAL=0
-prog="arptables"
-desc="Arp filtering"
-
-start() {
-	echo -n $"Starting $desc ($prog): "
-	__EXEC_PATH__/arptables-restore < __SYSCONFIG__/arptables || RETVAL=1
-
-	if [ $RETVAL -eq 0 ]; then
-		success "$prog startup"
-		rm -f /var/lock/subsys/$prog
-	else
-		failure "$prog startup"
-	fi
-
-	echo
-	return $RETVAL
-}
-
-stop() {
-	echo -n $"Stopping $desc ($prog): "
-	__EXEC_PATH__/arptables-restore < /dev/null || RETVAL=1
-
-	if [ $RETVAL -eq 0 ]; then
-		success "$prog shutdown"
-		rm -f %{_localstatedir}/lock/subsys/$prog
-	else
-		failure "$prog shutdown"
-	fi
-
-	echo
-	return $RETVAL
-}
-
-restart() {
-	stop
-	start
-}
-
-save() {
-	echo -n $"Saving $desc ($prog): "
-	__EXEC_PATH__/arptables-save > __SYSCONFIG__/arptables || RETVAL=1
-
-	if [ $RETVAL -eq 0 ]; then
-		success "$prog saved"
-	else
-		failure "$prog saved"
-	fi
-	echo
-}
-
-case "$1" in
-  start)
-	start
-	;;
-  stop)
-	stop
-	;;
-  restart|reload)
-	restart
-	;;
-  condrestart)
-	[ -e /var/lock/subsys/$prog ] && restart
-	RETVAL=$?
-	;;
-  save)
-	save
-	;;
-  status)
-	__EXEC_PATH__/arptables-save
-	RETVAL=$?
-	;;
-  *)
-	echo $"Usage $0 {start|stop|restart|condrestart|save|status}"
-	RETVAL=1
-esac
-
-exit $RETVAL

--
To unsubscribe from this list: send the line "unsubscribe netfilter-devel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html



[Index of Archives]     [Netfitler Users]     [LARTC]     [Bugtraq]     [Yosemite Forum]

  Powered by Linux