File: fwctl.init

package info (click to toggle)
fwctl 0.25-6
  • links: PTS
  • area: main
  • in suites: potato
  • size: 988 kB
  • ctags: 327
  • sloc: perl: 5,042; sh: 98; makefile: 57
file content (45 lines) | stat: -rw-r--r-- 927 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/sh
#
# fwctl		This shell script takes care of configuring the firewall
#           	using fwctl.
#
# chkconfig: 2345 09 98
# description: Configure the IP packet filtering firewall

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
. /etc/sysconfig/network

# Check that networking is up.
[ ${NETWORKING} = "no" ] && exit 0

# See how we were called.
case "$1" in
  start)
	action "Configuring IP packet filters" fwctl start
	echo
	touch /var/lock/subsys/fwctl
	;;
  stop)
	# Stop daemons.
	action "Configuring IP packet filters for loopback" fwctl stop
	echo
	rm -f /var/lock/subsys/fwctl
	;;
  check)
	fwctl check
	;;
  flush)
       action "WARNING: Flushing all firewall rules" fwctl flush
       ;;
  restart|reload)
	action "Updating IP packet filters" fwctl restart
	;;
  *)
        echo "Usage: fwctl {start|stop|check|restart|flush|reload}"
        exit 1
esac

exit 0