From 0a056557051f0f085f7f8ce99a31c4ed288e800f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Pekkarinen?= Date: Wed, 6 Oct 2021 09:20:31 +0300 Subject: [PATCH] package/iptables: S35iptables script cleanups MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 Signed-off-by: Peter Korsgaard --- 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