Update orangepi-config

This commit is contained in:
orangepi-xunlong
2021-12-08 15:38:53 +08:00
parent cbface3801
commit 5c94bef426
3 changed files with 6 additions and 3 deletions

2
external/cache/sources/orangepi-config/debian-config vendored Normal file → Executable file
View File

@@ -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."

View File

@@ -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

3
external/cache/sources/orangepi-config/debian-config-jobs vendored Normal file → Executable file
View File

@@ -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