mirror of
https://github.com/femtofox/femtofox.git
synced 2026-10-26 02:49:05 -04:00
Merge pull request #320 from femtofox/eth0_test
Use eth0 mac address for meshtasticd
This commit is contained in:
commit
abac1e33cb
8 changed files with 12 additions and 6 deletions
|
|
@ -56,13 +56,13 @@ echo "femtofox" | tee /etc/hostname > /dev/null
|
|||
|
||||
echo "Configuring autostart of systemd services..."
|
||||
systemctl enable button
|
||||
systemctl enable meshtasticd
|
||||
systemctl enable femto-runonce.service
|
||||
systemctl enable femto-usb-config-tool.service
|
||||
systemctl enable femto-boot-complete.service
|
||||
systemctl enable femto-wifi-mesh-control
|
||||
systemctl enable femto-watchclock-dog
|
||||
|
||||
systemctl disable meshtasticd
|
||||
systemctl disable apt-daily.timer
|
||||
systemctl disable unattended-upgrades
|
||||
systemctl disable smbd nmbd # samba services, can be enabled via menu
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
@ -1,6 +1,6 @@
|
|||
[Unit]
|
||||
Description=Foxbuntu First Boot
|
||||
After=meshtasticd.service
|
||||
After=rc-local.service
|
||||
Before=serial-getty@ttyFIQ0.service
|
||||
DefaultDependencies=no
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,6 @@
|
|||
[Unit]
|
||||
Description=Foxbuntu USB Configuration Tool
|
||||
After=meshtasticd.service
|
||||
After=rc-local.service
|
||||
Before=serial-getty@ttyFIQ0.service
|
||||
DefaultDependencies=no
|
||||
|
||||
|
|
|
|||
|
|
@ -1,6 +1,4 @@
|
|||
[Service]
|
||||
ExecStart=
|
||||
ExecStart=/bin/sh -c '/usr/sbin/meshtasticd -h $(sed -n "/Serial/ s/^.*: \\(.*\\)$/\\U\\1/p" /proc/cpuinfo | bc | tail -c 9)'
|
||||
Nice=-20
|
||||
|
||||
[Unit]
|
||||
|
|
|
|||
|
|
@ -108,4 +108,4 @@ Note: Dependencies are loaded/unloaded automatically." 0 0
|
|||
fi
|
||||
done
|
||||
|
||||
exit 0
|
||||
exit 0
|
||||
|
|
|
|||
|
|
@ -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..."
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue