mirror of
https://github.com/femtofox/femtofox.git
synced 2026-11-20 15:06:36 -05:00
Update rc.local
This commit is contained in:
parent
93f560a244
commit
2cf9ddd5cb
1 changed files with 4 additions and 2 deletions
|
|
@ -68,8 +68,10 @@ 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) & 0x3B9AC9FF)):" /usr/lib/systemd/system/meshtasticd.service
|
||||
echo "Using Luckfox CPU S/N to generate nodeid for Meshtastic."
|
||||
seed=$(printf "%d\n" 0x$(awk '/Serial/ {print $3}' /proc/cpuinfo) | tail -c 10)
|
||||
#seed=$((0x$(awk '/Serial/ {print $3}' /proc/cpuinfo) & 0x3B9AC9FF))
|
||||
sed -i "/^ExecStart=/ s:$: --hwid $(seed):" /usr/lib/systemd/system/meshtasticd.service
|
||||
echo "Using Luckfox CPU S/N to generate nodeid for Meshtastic. Using seed $(seed)."
|
||||
systemctl daemon-reload
|
||||
systemctl enable meshtasticd
|
||||
systemctl start meshtasticd
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue