Predictable device names

This commit is contained in:
Bob Mottram 2017-06-19 14:48:51 +01:00
parent 89d05deae7
commit 2733e46d67
3 changed files with 16 additions and 0 deletions

View File

@ -612,6 +612,7 @@ initialise_mesh() {
chroot "$rootdir" apt-get -yq install apt-transport-https
enable_predictable_device_names
configure_firewall
install_avahi
install_batman

View File

@ -660,6 +660,9 @@ function setup_utils {
function_check remove_management_engine_interface
remove_management_engine_interface
function_check enable_predictable_device_names
enable_predictable_device_names
function_check separate_tmp_filesystem
separate_tmp_filesystem 150

View File

@ -39,6 +39,18 @@ WIFI_NETWORKS_FILE=~/${PROJECT_NAME}-wifi.cfg
# repo for atheros AR9271 wifi driver
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 {
wifi_state=$(wpa_cli status)
if [[ "$wifi_state" == *"COMPLETED"* ]]; then