mirror of
https://github.com/femtofox/femtofox.git
synced 2026-10-26 19:02:00 -04:00
Update rc.local
This commit is contained in:
parent
e42b7c7ebb
commit
ccf6993f2d
1 changed files with 5 additions and 3 deletions
|
|
@ -71,10 +71,12 @@ fi
|
|||
|
||||
#run once to set meshtastic nodeid to derivative of CPU serial number (unique to this board). Check at boot in case of upgrade overwriting this.
|
||||
if ! grep -q "^ExecStart=.*--hwid" /usr/lib/systemd/system/meshtasticd.service; then
|
||||
sed -i "/^ExecStart=/ s:$: --hwid $((0x$(awk '/Serial/ {print $3}' /proc/cpuinfo) & 0xFFFFFFFF)):" /usr/lib/systemd/system/meshtasticd.service
|
||||
echo "Used Luckfox CPU S/N to generate unique nodeid seed for Meshtastic."
|
||||
cp /root/.portduino/default/prefs/config.proto /tmp/config.proto.bak
|
||||
sed -i "/^ExecStart=/ s:$: -e --hwid $((0x$(awk '/Serial/ {print $3}' /proc/cpuinfo) & 0xFFFFFFFF)):" /usr/lib/systemd/system/meshtasticd.service
|
||||
echo "Using Luckfox CPU S/N to generate nodeid for Meshtastic."
|
||||
systemctl daemon-reload
|
||||
systemctl restart meshtasticd
|
||||
systemctl enable meshtasticd
|
||||
systemctl start meshtasticd
|
||||
fi
|
||||
|
||||
# boot complete
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue