diff options
| author | emmett1 <emmett1.2miligrams@protonmail.com> | 2025-09-12 03:06:39 +0800 |
|---|---|---|
| committer | emmett1 <emmett1.2miligrams@protonmail.com> | 2025-09-12 03:06:39 +0800 |
| commit | 905e86e8323a97c4190e231dfa51182b39d31a9f (patch) | |
| tree | 06e9523130d77c5c9abdb687f6faa4663c20e1c6 /repos/extra/iptables/use-sh-iptables-apply.patch | |
| parent | 074ddb6661dc348f641eefbf33b5d66f432275b6 (diff) | |
| download | alicelinux-905e86e8323a97c4190e231dfa51182b39d31a9f.tar.gz alicelinux-905e86e8323a97c4190e231dfa51182b39d31a9f.zip | |
iptables: new added
Diffstat (limited to 'repos/extra/iptables/use-sh-iptables-apply.patch')
| -rw-r--r-- | repos/extra/iptables/use-sh-iptables-apply.patch | 39 |
1 files changed, 39 insertions, 0 deletions
diff --git a/repos/extra/iptables/use-sh-iptables-apply.patch b/repos/extra/iptables/use-sh-iptables-apply.patch new file mode 100644 index 00000000..b31fc948 --- /dev/null +++ b/repos/extra/iptables/use-sh-iptables-apply.patch @@ -0,0 +1,39 @@ +From: Simon Frankenberger <simon-alpine@fraho.eu> + +make iptables-apply use posix sh + +--- a/iptables/iptables-apply ++++ b/iptables/iptables-apply +@@ -1,4 +1,4 @@ +-#!/bin/bash ++#!/bin/sh + # iptables-apply -- a safer way to update iptables remotely + # + # Usage: +@@ -110,7 +110,7 @@ + } + + function checkcommands() { +- for cmd in "${COMMANDS[@]}"; do ++ for cmd in ${COMMANDS}; do + if ! command -v "$cmd" >/dev/null; then + echo "Error: needed command not found: $cmd" >&2 + exit 127 +@@ -184,7 +184,7 @@ + fi + + # Needed commands +- COMMANDS=(mktemp "$SAVE" "$RESTORE" "$RUNCMD") ++ COMMANDS="mktemp $SAVE $RESTORE $RUNCMD" + checkcommands + ;; + (*) +@@ -196,7 +196,7 @@ + fi + + # Needed commands +- COMMANDS=(mktemp "$SAVE" "$RESTORE") ++ COMMANDS="mktemp $SAVE $RESTORE" + checkcommands + ;; + esac |