mirror of
https://github.com/DrHo1y/orangepi-build.git
synced 2026-03-23 17:16:43 +07:00
Update orangepi-config
This commit is contained in:
2
external/cache/sources/orangepi-config/debian-config
vendored
Normal file → Executable file
2
external/cache/sources/orangepi-config/debian-config
vendored
Normal file → Executable 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."
|
||||
|
||||
@@ -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
3
external/cache/sources/orangepi-config/debian-config-jobs
vendored
Normal file → Executable 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
|
||||
|
||||
Reference in New Issue
Block a user