Predictable device names
This commit is contained in:
parent
89d05deae7
commit
2733e46d67
|
@ -612,6 +612,7 @@ initialise_mesh() {
|
||||||
|
|
||||||
chroot "$rootdir" apt-get -yq install apt-transport-https
|
chroot "$rootdir" apt-get -yq install apt-transport-https
|
||||||
|
|
||||||
|
enable_predictable_device_names
|
||||||
configure_firewall
|
configure_firewall
|
||||||
install_avahi
|
install_avahi
|
||||||
install_batman
|
install_batman
|
||||||
|
|
|
@ -660,6 +660,9 @@ function setup_utils {
|
||||||
function_check remove_management_engine_interface
|
function_check remove_management_engine_interface
|
||||||
remove_management_engine_interface
|
remove_management_engine_interface
|
||||||
|
|
||||||
|
function_check enable_predictable_device_names
|
||||||
|
enable_predictable_device_names
|
||||||
|
|
||||||
function_check separate_tmp_filesystem
|
function_check separate_tmp_filesystem
|
||||||
separate_tmp_filesystem 150
|
separate_tmp_filesystem 150
|
||||||
|
|
||||||
|
|
|
@ -39,6 +39,18 @@ WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg
|
||||||
# repo for atheros AR9271 wifi driver
|
# repo for atheros AR9271 wifi driver
|
||||||
ATHEROS_WIFI_REPO="https://github.com/qca/open-ath9k-htc-firmware.git"
|
ATHEROS_WIFI_REPO="https://github.com/qca/open-ath9k-htc-firmware.git"
|
||||||
|
|
||||||
|
# Debian stretch has a problem where the formerly predictable wlan0 and eth0
|
||||||
|
# device names get assigned random names. This is a hacky workaround.
|
||||||
|
function enable_predictable_device_names {
|
||||||
|
if [ $rootdir ]; then
|
||||||
|
chroot "$rootdir" ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
|
||||||
|
chroot "$rootdir" update-initramfs -u
|
||||||
|
else
|
||||||
|
ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
|
||||||
|
update-initramfs -u
|
||||||
|
fi
|
||||||
|
}
|
||||||
|
|
||||||
function wifi_is_running {
|
function wifi_is_running {
|
||||||
wifi_state=$(wpa_cli status)
|
wifi_state=$(wpa_cli status)
|
||||||
if [[ "$wifi_state" == *"COMPLETED"* ]]; then
|
if [[ "$wifi_state" == *"COMPLETED"* ]]; then
|
||||||
|
|
Loading…
Reference in New Issue