Commit 706f5972 authored by Igor Pecovnik's avatar Igor Pecovnik
Browse files

Updated wireless device handling due to changes...

Updated wireless device handling due to changes https://github.com/armbian/build/commit/38db0b55f9fbb841e0fe37659bd8b6d8fb0a201a and removing dependencies check out since it slows down execution -  added to Readme and build configuration.
parent e7bad359
...@@ -46,8 +46,10 @@ Login as root and type: ...@@ -46,8 +46,10 @@ Login as root and type:
**Running this utility on 3rd party Debian based distributions** **Running this utility on 3rd party Debian based distributions**
sudo apt-get -y install git # Install dependencies
cd ~ apt install git bc expect rcconf dialog network-manager sunxi-tools iptables
git clone https://github.com/armbian/config git clone https://github.com/armbian/config
cd config cd config
bash debian-config bash debian-config
...@@ -26,21 +26,6 @@ echo -e "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1 ...@@ -26,21 +26,6 @@ echo -e "GET http://google.com HTTP/1.0\n\n" | nc google.com 80 > /dev/null 2>&1
if [[ $? -ne 0 ]]; then if [[ $? -ne 0 ]]; then
read -n 1 -s -p "Warning. Configurator can't work properly without internet connection. \ read -n 1 -s -p "Warning. Configurator can't work properly without internet connection. \
Press CTRL C to stop to stop or any key to ignore and continue." Press CTRL C to stop to stop or any key to ignore and continue."
else
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' bc 2>/dev/null) != "*ii*" ]] && \
apt-get -qq -y --no-install-recommends install bc
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' expect 2>/dev/null) != "*ii*" ]] && \
apt-get -qq -y --no-install-recommends install expect
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' rcconf 2>/dev/null) != "*ii*" ]] && \
apt-get -qq -y --no-install-recommends install rcconf
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' dialog 2>/dev/null) != "*ii*" ]] && \
apt-get -qq -y --no-install-recommends install dialog
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' network-manager 2>/dev/null) != "*ii*" ]] && \
apt-get -qq -y --no-install-recommends install network-manager
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' sunxi-tools 2>/dev/null) != "*ii*" ]] && \
apt-get -qq -y --no-install-recommends install sunxi-tools
[[ $(dpkg-query -W -f='${db:Status-Abbrev}\n' iptables 2>/dev/null) != "*ii*" ]] && \
apt-get -qq -y --no-install-recommends install iptables
fi fi
......
...@@ -215,7 +215,8 @@ function jobs () ...@@ -215,7 +215,8 @@ function jobs ()
"Clear" ) "Clear" )
# remove managed interfaces # remove managed interfaces
systemctl daemon-reload systemctl daemon-reload
sed '/keyfile\|unmanaged-devices/ d' -i /etc/NetworkManager/NetworkManager.conf sed 's/interface-name:wl.*//' -i /etc/NetworkManager/conf.d/10-ignore-interfaces.conf
sed 's/,$//' -i /etc/NetworkManager/conf.d/10-ignore-interfaces.conf
rm -f /etc/network/interfaces.d/armbian.ap.nat rm -f /etc/network/interfaces.d/armbian.ap.nat
rm -f /etc/network/interfaces.d/armbian.ap.bridge rm -f /etc/network/interfaces.d/armbian.ap.bridge
reload-nety reload-nety
...@@ -250,7 +251,8 @@ function jobs () ...@@ -250,7 +251,8 @@ function jobs ()
rm -f /etc/network/interfaces.d/armbian.ap.nat rm -f /etc/network/interfaces.d/armbian.ap.nat
rm -f /etc/network/interfaces.d/armbian.ap.bridge rm -f /etc/network/interfaces.d/armbian.ap.bridge
sed -i '/^iptables/ d' /etc/rc.local sed -i '/^iptables/ d' /etc/rc.local
sed '/keyfile\|unmanaged-devices/ d' -i /etc/NetworkManager/NetworkManager.conf sed 's/interface-name:wl.*//' -i /etc/NetworkManager/conf.d/10-ignore-interfaces.conf
sed 's/,$//' -i /etc/NetworkManager/conf.d/10-ignore-interfaces.conf
iptables -F iptables -F
# reload services # reload services
reload-nety reload-nety
...@@ -261,7 +263,10 @@ function jobs () ...@@ -261,7 +263,10 @@ function jobs ()
dialog --title " Info " --backtitle "$BACKTITLE" --no-collapse --msgbox "\nAll wireless connections are in use." 7 40 dialog --title " Info " --backtitle "$BACKTITLE" --no-collapse --msgbox "\nAll wireless connections are in use." 7 40
else else
# remove interfaces from managed list # remove interfaces from managed list
sed '/keyfile\|unmanaged-devices/ d' -i /etc/NetworkManager/NetworkManager.conf if [[ -f /etc/NetworkManager/conf.d/10-ignore-interfaces.conf ]]; then
sed 's/interface-name:wl.*//' -i /etc/NetworkManager/conf.d/10-ignore-interfaces.conf
sed 's/,$//' -i /etc/NetworkManager/conf.d/10-ignore-interfaces.conf
fi
# start with basic config # start with basic config
if grep -q "^## IEEE 802.11ac" /etc/hostapd.conf; then sed '/## IEEE 802.11ac\>/,/^## IEEE 802.11ac\>/ s/.*/#&/' -i /etc/hostapd.conf; fi if grep -q "^## IEEE 802.11ac" /etc/hostapd.conf; then sed '/## IEEE 802.11ac\>/,/^## IEEE 802.11ac\>/ s/.*/#&/' -i /etc/hostapd.conf; fi
...@@ -275,8 +280,13 @@ function jobs () ...@@ -275,8 +280,13 @@ function jobs ()
# check for WLAN interfaces # check for WLAN interfaces
get_wlan_interface get_wlan_interface
# add interface to unmanaged list # add interface to unmanaged list
echo "[keyfile]" >> /etc/NetworkManager/NetworkManager.conf if [[ -f /etc/NetworkManager/conf.d/10-ignore-interfaces.conf ]]; then
echo "unmanaged-devices=interface-name:$WIRELESS_ADAPTER" >> /etc/NetworkManager/NetworkManager.conf [[ -z $(grep -w unmanaged-devices= /etc/NetworkManager/conf.d/10-ignore-interfaces.conf) ]] && sed '$ s/$/,/' -i /etc/NetworkManager/conf.d/10-ignore-interfaces.conf
sed '$ s/$/'"interface-name:$WIRELESS_ADAPTER"'/' -i /etc/NetworkManager/conf.d/10-ignore-interfaces.conf
else
echo "[keyfile]" > /etc/NetworkManager/conf.d/10-ignore-interfaces.conf
echo "unmanaged-devices=interface-name:$WIRELESS_ADAPTER" >> /etc/NetworkManager/conf.d/10-ignore-interfaces.conf
fi
service network-manager restart; sleep 3 service network-manager restart; sleep 3
# display dialog # display dialog
dialog --colors --backtitle "$BACKTITLE" --title "Please wait" --infobox \ dialog --colors --backtitle "$BACKTITLE" --title "Please wait" --infobox \
...@@ -320,7 +330,8 @@ function jobs () ...@@ -320,7 +330,8 @@ function jobs ()
--infobox "\nWireless adapter: $WIRELESS_ADAPTER\n\nNo compatible hostapd driver found." 7 39 --infobox "\nWireless adapter: $WIRELESS_ADAPTER\n\nNo compatible hostapd driver found." 7 39
sed -i "s/^DAEMON_CONF=.*/DAEMON_CONF=/" /etc/init.d/hostapd sed -i "s/^DAEMON_CONF=.*/DAEMON_CONF=/" /etc/init.d/hostapd
# remove interfaces from managed list # remove interfaces from managed list
sed '/keyfile\|unmanaged-devices/ d' -i /etc/NetworkManager/NetworkManager.conf sed 's/interface-name:wl.*//' -i /etc/NetworkManager/conf.d/10-ignore-interfaces.conf
sed 's/,$//' -i /etc/NetworkManager/conf.d/10-ignore-interfaces.conf
systemctl daemon-reload;service hostapd restart systemctl daemon-reload;service hostapd restart
sleep 3 sleep 3
break break
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment