From 001e2089e84157eb8b60672ed809db591da79c20 Mon Sep 17 00:00:00 2001 From: nagumii Date: Wed, 4 Dec 2024 18:47:01 +0200 Subject: [PATCH] Update rc.local --- .../overlay/overlay-luckfox-ubuntu/etc/rc.local | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/foxbuntu/project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu/etc/rc.local b/foxbuntu/project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu/etc/rc.local index c1c5963..3c1bd76 100755 --- a/foxbuntu/project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu/etc/rc.local +++ b/foxbuntu/project/cfg/BoardConfig_IPC/overlay/overlay-luckfox-ubuntu/etc/rc.local @@ -68,10 +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 - seed=$(printf "%d\n" 0x$(awk '/Serial/ {print $3}' /proc/cpuinfo) | tail -c 10) - #seed=$((0x$(awk '/Serial/ {print $3}' /proc/cpuinfo) & 0x3B9AC9FF)) + 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." + echo "Using Luckfox CPU S/N to generate nodeid for Meshtastic." systemctl daemon-reload systemctl enable meshtasticd systemctl start meshtasticd