[Buildroot] [PATCH] package/iptables: S35iptables script cleanups
José Pekkarinen
jose.pekkarinen at unikie.com
Wed Oct 6 06:20:31 UTC 2021
This patch removes unneeded redirections when
calling iptables-restore and iptables-save, and
it adds the save operation to the usage help.
Signed-off-by: José Pekkarinen <jose.pekkarinen at unikie.com>
---
package/iptables/S35iptables | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/package/iptables/S35iptables b/package/iptables/S35iptables
index ff3f51a2ba..a2de29d222 100644
--- a/package/iptables/S35iptables
+++ b/package/iptables/S35iptables
@@ -6,7 +6,7 @@ IPTABLES_ARGS=""
start() {
printf 'Starting %s: ' "$DAEMON"
- iptables-restore < /etc/iptables.conf
+ iptables-restore /etc/iptables.conf
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
@@ -36,7 +36,7 @@ restart() {
save() {
printf 'Saving %s: ' "$DAEMON"
- iptables-save > /etc/iptables.conf
+ iptables-save -f /etc/iptables.conf
status=$?
if [ "$status" -eq 0 ]; then
echo "OK"
@@ -53,6 +53,6 @@ case "$1" in
# Restart, since there is no true "reload" feature.
restart;;
*)
- echo "Usage: $0 {start|stop|restart|reload}"
+ echo "Usage: $0 {start|stop|restart|save|reload}"
exit 1
esac
--
2.25.1
More information about the buildroot
mailing list