From 7cb3e6285078d09cb5e5d5888a6e4e5d24774da6 Mon Sep 17 00:00:00 2001 From: ShH Y <74806550+1208nn@users.noreply.github.com> Date: Fri, 5 Dec 2025 23:06:16 +0800 Subject: [PATCH 1/2] Use sudo for grep in common.sh --- installers/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installers/common.sh b/installers/common.sh index bd1ba0ce..581bfb01 100644 --- a/installers/common.sh +++ b/installers/common.sh @@ -836,7 +836,7 @@ function _configure_networking() { "-A POSTROUTING -s 192.168.50.0/24 ! -d 192.168.50.0/24 -j MASQUERADE" ) for rule in "${rules[@]}"; do - if grep -- "$rule" $rulesv4 > /dev/null; then + if sudo grep -- "$rule" $rulesv4 > /dev/null; then echo "Rule already exits: ${rule}" else rule=$(sed -e 's/^\(-A POSTROUTING\)/-t nat \1/' <<< $rule) From b21f9897e7d3d7570af34005ce5d7d15cfe03991 Mon Sep 17 00:00:00 2001 From: ShH Y <74806550+1208nn@users.noreply.github.com> Date: Fri, 5 Dec 2025 23:17:48 +0800 Subject: [PATCH 2/2] Update installers/common.sh Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> --- installers/common.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/installers/common.sh b/installers/common.sh index 581bfb01..c4b8052a 100644 --- a/installers/common.sh +++ b/installers/common.sh @@ -837,7 +837,7 @@ function _configure_networking() { ) for rule in "${rules[@]}"; do if sudo grep -- "$rule" $rulesv4 > /dev/null; then - echo "Rule already exits: ${rule}" + echo "Rule already exists: ${rule}" else rule=$(sed -e 's/^\(-A POSTROUTING\)/-t nat \1/' <<< $rule) echo "Adding rule: ${rule}"