Move predictable network device setup to first boot on mesh

This commit is contained in:
Bob Mottram 2017-06-26 21:25:51 +01:00
parent a79d279ebf
commit 8c1769284e
3 changed files with 11 additions and 8 deletions

View File

@ -591,7 +591,6 @@ 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

View File

@ -74,6 +74,14 @@ IPFS_PORT=4001
CURRENT_BLOG_INDEX=/home/$MY_USERNAME/.blog-index CURRENT_BLOG_INDEX=/home/$MY_USERNAME/.blog-index
# Debian stretch has a problem where the formerly predictable wlan0 and eth0
# device names get assigned random names. This is a hacky workaround.
# Also adding net.ifnames=0 to kernel options on bootloader may work.
function enable_predictable_device_names {
ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
update-initramfs -u
}
function create_avahi_mesh_service { function create_avahi_mesh_service {
service_name=$1 service_name=$1
service_type=$2 service_type=$2
@ -591,6 +599,7 @@ if [ -f $MESH_INSTALL_SETUP ]; then
#tomb slam all #tomb slam all
tmp_ram_disk 100 tmp_ram_disk 100
enable_predictable_device_names
enable_batman_daemon enable_batman_daemon
#create_ram_disk 1 #create_ram_disk 1
#setup_amnesic_data #setup_amnesic_data

View File

@ -49,13 +49,8 @@ function default_network_config {
# device names get assigned random names. This is a hacky workaround. # device names get assigned random names. This is a hacky workaround.
# Also adding net.ifnames=0 to kernel options on bootloader may work. # Also adding net.ifnames=0 to kernel options on bootloader may work.
function enable_predictable_device_names { function enable_predictable_device_names {
if [ $rootdir ]; then ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
chroot "$rootdir" ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules update-initramfs -u
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 {