From ccf6993f2d9db902995c9d84f2fb0271c7417f0b Mon Sep 17 00:00:00 2001 From: nagumii Date: Wed, 4 Dec 2024 15:39:20 +0200 Subject: [PATCH] Update rc.local --- .../overlay/overlay-luckfox-ubuntu/etc/rc.local | 8 +++++--- 1 file changed, 5 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 2859a07..e46130f 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 @@ -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