From 5c94bef42651c515f4323f7e81d2f61dfb91026c Mon Sep 17 00:00:00 2001 From: orangepi-xunlong <258384131@qq.com> Date: Wed, 8 Dec 2021 15:38:53 +0800 Subject: [PATCH] Update orangepi-config --- external/cache/sources/orangepi-config/debian-config | 2 +- .../sources/orangepi-config/debian-config-functions-network | 4 ++-- external/cache/sources/orangepi-config/debian-config-jobs | 3 +++ 3 files changed, 6 insertions(+), 3 deletions(-) mode change 100644 => 100755 external/cache/sources/orangepi-config/debian-config mode change 100644 => 100755 external/cache/sources/orangepi-config/debian-config-jobs diff --git a/external/cache/sources/orangepi-config/debian-config b/external/cache/sources/orangepi-config/debian-config old mode 100644 new mode 100755 index 068d90c..d4da0b1 --- a/external/cache/sources/orangepi-config/debian-config +++ b/external/cache/sources/orangepi-config/debian-config @@ -23,7 +23,7 @@ fi # # check for internet connection to install dependencies # -wget -q --spider http://github.com +wget -q --spider www.baidu.com if [[ $? -ne 0 ]]; then read -n 1 -s -p "Warning: Configuration cannot work properly without a working internet connection. \ Press CTRL C to stop or any key to ignore and continue." diff --git a/external/cache/sources/orangepi-config/debian-config-functions-network b/external/cache/sources/orangepi-config/debian-config-functions-network index 3f69cf9..60c171a 100755 --- a/external/cache/sources/orangepi-config/debian-config-functions-network +++ b/external/cache/sources/orangepi-config/debian-config-functions-network @@ -562,7 +562,7 @@ function get_wlan_interface () else exec 3>&1 WIRELESS_ADAPTER=$(dialog --nocancel --backtitle "$BACKTITLE" --no-collapse \ - --title "Select interface" --clear --menu "" $((6+${LIST_LENGTH})) 40 15 "${LIST[@]}" 2>&1 1>&3) + --title "Select wlan interface" --clear --menu "" $((6+${LIST_LENGTH})) 40 15 "${LIST[@]}" 2>&1 1>&3) exec 3>&- fi @@ -642,7 +642,7 @@ function select_default_interface () else exec 3>&1 DEFAULT_ADAPTER=$(dialog --nocancel --backtitle "$BACKTITLE" --no-collapse \ - --title "Select $1 interface" --clear --menu "" $((6+${LIST_LENGTH})) 74 14 "${LIST[@]}" 2>&1 1>&3) + --title "Select default interface" --clear --menu "" $((6+${LIST_LENGTH})) 74 14 "${LIST[@]}" 2>&1 1>&3) exec 3>&- fi fi diff --git a/external/cache/sources/orangepi-config/debian-config-jobs b/external/cache/sources/orangepi-config/debian-config-jobs old mode 100644 new mode 100755 index c098af1..51d6e2e --- a/external/cache/sources/orangepi-config/debian-config-jobs +++ b/external/cache/sources/orangepi-config/debian-config-jobs @@ -649,6 +649,9 @@ function jobs () echo 1 > /proc/sys/net/ipv4/ip_forward # Clear iptables iptables-save | awk '/^[*]/ { print $1 } /^:[A-Z]+ [^-]/ { print $1 " ACCEPT" ; } /COMMIT/ { print $0; }' | iptables-restore + if [[ ${DISTRIBUTION_CODENAME} == buster ]]; then + echo 1 | update-alternatives --config iptables > /dev/null + fi # - Apply iptables iptables -t nat -A POSTROUTING -o $DEFAULT_ADAPTER -j MASQUERADE iptables -A FORWARD -i $DEFAULT_ADAPTER -o $WIRELESS_ADAPTER -m state --state RELATED,ESTABLISHED -j ACCEPT