All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] package/iptables: S35iptables script cleanups
@ 2021-10-08 10:44 Peter Korsgaard
  0 siblings, 0 replies; only message in thread
From: Peter Korsgaard @ 2021-10-08 10:44 UTC (permalink / raw)
  To: buildroot

[-- Attachment #1: Type: text/plain, Size: 1341 bytes --]

commit: https://git.buildroot.net/buildroot/commit/?id=0a056557051f0f085f7f8ce99a31c4ed288e800f
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

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@unikie.com>
Signed-off-by: Peter Korsgaard <peter@korsgaard.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

[-- Attachment #2: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2021-10-08 10:48 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-08 10:44 [Buildroot] [git commit] package/iptables: S35iptables script cleanups Peter Korsgaard

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.