Move predictable network device setup to first boot on mesh
This commit is contained in:
parent
a79d279ebf
commit
8c1769284e
|
@ -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
|
||||
}
|
||||
|
||||
function wifi_is_running {
|
||||
|
|
Loading…
Reference in New Issue