diff options
| -rw-r--r-- | meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common b/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common index 640025dba6..1ae18fed3d 100644 --- a/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common +++ b/meta-networking/recipes-filter/ebtables/ebtables-2.0.10-4/ebtables.common | |||
| @@ -20,7 +20,7 @@ EBTABLES_BACKUP_SUFFIX="~" | |||
| 20 | config=/etc/default/$prog | 20 | config=/etc/default/$prog |
| 21 | [ -f "$config" ] && . "$config" | 21 | [ -f "$config" ] && . "$config" |
| 22 | 22 | ||
| 23 | function get_supported_tables() { | 23 | get_supported_tables() { |
| 24 | EBTABLES_SUPPORTED_TABLES= | 24 | EBTABLES_SUPPORTED_TABLES= |
| 25 | /sbin/ebtables -t filter -L 2>&1 1>/dev/null | grep -q permission | 25 | /sbin/ebtables -t filter -L 2>&1 1>/dev/null | grep -q permission |
| 26 | if [ $? -eq 0 ]; then | 26 | if [ $? -eq 0 ]; then |
| @@ -35,7 +35,7 @@ function get_supported_tables() { | |||
| 35 | done | 35 | done |
| 36 | } | 36 | } |
| 37 | 37 | ||
| 38 | function load() { | 38 | load() { |
| 39 | RETVAL=0 | 39 | RETVAL=0 |
| 40 | get_supported_tables | 40 | get_supported_tables |
| 41 | echo -n "Restoring ebtables rulesets: " | 41 | echo -n "Restoring ebtables rulesets: " |
| @@ -64,7 +64,7 @@ function load() { | |||
| 64 | fi | 64 | fi |
| 65 | } | 65 | } |
| 66 | 66 | ||
| 67 | function clear() { | 67 | clear_rules() { |
| 68 | RETVAL=0 | 68 | RETVAL=0 |
| 69 | get_supported_tables | 69 | get_supported_tables |
| 70 | echo -n "Clearing ebtables rulesets: " | 70 | echo -n "Clearing ebtables rulesets: " |
| @@ -90,7 +90,7 @@ function clear() { | |||
| 90 | fi | 90 | fi |
| 91 | } | 91 | } |
| 92 | 92 | ||
| 93 | function save() { | 93 | save() { |
| 94 | RETVAL=0 | 94 | RETVAL=0 |
| 95 | get_supported_tables | 95 | get_supported_tables |
| 96 | echo -n "Saving ebtables rulesets: " | 96 | echo -n "Saving ebtables rulesets: " |
| @@ -127,11 +127,11 @@ case "$1" in | |||
| 127 | ;; | 127 | ;; |
| 128 | stop) | 128 | stop) |
| 129 | [ "$EBTABLES_SAVE_ON_STOP" = "yes" ] && save | 129 | [ "$EBTABLES_SAVE_ON_STOP" = "yes" ] && save |
| 130 | clear | 130 | clear_rules |
| 131 | ;; | 131 | ;; |
| 132 | restart|reload|force-reload) | 132 | restart|reload|force-reload) |
| 133 | [ "$EBTABLES_SAVE_ON_RESTART" = "yes" ] && save | 133 | [ "$EBTABLES_SAVE_ON_RESTART" = "yes" ] && save |
| 134 | clear | 134 | clear_rules |
| 135 | [ "$EBTABLES_LOAD_ON_START" = "yes" ] && load | 135 | [ "$EBTABLES_LOAD_ON_START" = "yes" ] && load |
| 136 | ;; | 136 | ;; |
| 137 | load) | 137 | load) |
