Switch source of meshtasticd mac address to eth0

This commit is contained in:
nagumii 2025-02-12 18:42:37 +02:00
parent c51ffabb57
commit e337ed62ae
4 changed files with 9 additions and 1 deletions

View file

@ -56,7 +56,7 @@ echo "femtofox" | tee /etc/hostname > /dev/null
echo "Configuring autostart of systemd services..."
systemctl enable button
systemctl enable meshtasticd
#systemctl enable meshtasticd
systemctl enable femto-runonce.service
systemctl enable femto-usb-config-tool.service
systemctl enable femto-boot-complete.service

View file

@ -0,0 +1,4 @@
# this sets the mac address source to eth0, replacing the previous code that derived a seed from the CPU s/n.
# of course, eth0 also has its mac address derived from CPU s/n, but this way meshtastic uses the exact mac address, instead of a bastardized version converted to a 9 digit int with `| bc | tail -c -9`.
General:
MACAddressSource: eth0

View file

@ -22,6 +22,7 @@ Re-running this script will:\n\
* Set the eth0 MAC to be derivative of CPU serial number\n\
* Add terminal type to user femto's .bashrc\n\
* Add a shortcut \`sfc\` to user femto's .bashrc\n\
* Enable the meshtasticd service\n\
\n\
Finally, the Femtofox will reboot.\n\
\n\
@ -106,6 +107,9 @@ else
log_message "\`alias sfc='sudo femto-config'\` already present in .bashrc, skipping"
fi
log_message "Enabling meshtasticd service"
systemctl enable meshtasticd
# remove first boot flag
sed -i -E 's/^first_boot=.*/first_boot=false/' /etc/femto.conf
log_message "Removing first boot flag and rebooting in 5 seconds..."