Skip to content
Snippets Groups Projects
Commit 8c176928 authored by Bob Mottram's avatar Bob Mottram
Browse files

Move predictable network device setup to first boot on mesh

parent a79d279e
No related branches found
No related tags found
No related merge requests found
......@@ -591,7 +591,6 @@ initialise_mesh() {
chroot "$rootdir" apt-get -yq install apt-transport-https
enable_predictable_device_names
configure_firewall
install_avahi
install_batman
......
......@@ -74,6 +74,14 @@ IPFS_PORT=4001
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 {
service_name=$1
service_type=$2
......@@ -591,6 +599,7 @@ if [ -f $MESH_INSTALL_SETUP ]; then
#tomb slam all
tmp_ram_disk 100
enable_predictable_device_names
enable_batman_daemon
#create_ram_disk 1
#setup_amnesic_data
......
......@@ -49,13 +49,8 @@ function default_network_config {
# 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 {
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
ln -s /dev/null /etc/udev/rules.d/80-net-setup-link.rules
update-initramfs -u
}
function wifi_is_running {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment