use-sh-iptables-apply.patch (810B)
1 From: Simon Frankenberger <simon-alpine@fraho.eu> 2 3 make iptables-apply use posix sh 4 5 --- a/iptables/iptables-apply 6 +++ b/iptables/iptables-apply 7 @@ -1,4 +1,4 @@ 8 -#!/bin/bash 9 +#!/bin/sh 10 # iptables-apply -- a safer way to update iptables remotely 11 # 12 # Usage: 13 @@ -110,7 +110,7 @@ 14 } 15 16 function checkcommands() { 17 - for cmd in "${COMMANDS[@]}"; do 18 + for cmd in ${COMMANDS}; do 19 if ! command -v "$cmd" >/dev/null; then 20 echo "Error: needed command not found: $cmd" >&2 21 exit 127 22 @@ -184,7 +184,7 @@ 23 fi 24 25 # Needed commands 26 - COMMANDS=(mktemp "$SAVE" "$RESTORE" "$RUNCMD") 27 + COMMANDS="mktemp $SAVE $RESTORE $RUNCMD" 28 checkcommands 29 ;; 30 (*) 31 @@ -196,7 +196,7 @@ 32 fi 33 34 # Needed commands 35 - COMMANDS=(mktemp "$SAVE" "$RESTORE") 36 + COMMANDS="mktemp $SAVE $RESTORE" 37 checkcommands 38 ;; 39 esac