Last change
on this file since 2873 was
2862,
checked in by broder, 15 years ago
|
Use /etc/invirt-iptables/rules.d instead of /usr/share.
|
-
Property svn:executable set to
*
|
File size:
798 bytes
|
Rev | Line | |
---|
[2861] | 1 | #! /bin/sh |
---|
| 2 | ### BEGIN INIT INFO |
---|
| 3 | # Provides: invirt-iptables |
---|
| 4 | # Required-Start: $local_fs $remote_fs |
---|
| 5 | # Required-Stop: $local_fs $remote_fs |
---|
| 6 | # Default-Start: 2 3 4 5 |
---|
| 7 | # Default-Stop: 0 1 6 |
---|
| 8 | # Short-Description: Invirt iptables rules |
---|
| 9 | # Description: |
---|
| 10 | ### END INIT INFO |
---|
| 11 | |
---|
| 12 | NAME=invirt-iptables |
---|
| 13 | DESC="Invirt iptables rules" |
---|
[2862] | 14 | RULES=/etc/invirt-iptables/rules.d |
---|
[2861] | 15 | PATH=/sbin:/usr/sbin:/bin:/usr/bin |
---|
| 16 | |
---|
| 17 | dpkg -s "$NAME" >/dev/null 2>/dev/null || exit 0 |
---|
| 18 | |
---|
| 19 | . /lib/init/std-init.sh |
---|
| 20 | |
---|
| 21 | do_start() |
---|
| 22 | { |
---|
| 23 | echo 1 > /proc/sys/net/ipv4/ip_forward |
---|
| 24 | |
---|
| 25 | for table in $(sed -ne 's/^*//p' $(run-parts --list "$RULES")); do |
---|
| 26 | iptables -t "$table" -F |
---|
| 27 | done |
---|
| 28 | cat $(run-parts --list "$RULES") | iptables-restore -n |
---|
| 29 | } |
---|
| 30 | |
---|
| 31 | do_reload() |
---|
| 32 | { |
---|
| 33 | do_start |
---|
| 34 | } |
---|
| 35 | |
---|
| 36 | do_stop() |
---|
| 37 | { |
---|
| 38 | return 0 |
---|
| 39 | } |
---|
| 40 | |
---|
| 41 | std_init "$1" |
---|
Note: See
TracBrowser
for help on using the repository browser.