From 93f560a244f087539ef6a76c5838ee460528027f Mon Sep 17 00:00:00 2001 From: nagumii Date: Wed, 4 Dec 2024 16:44:04 +0200 Subject: [PATCH] Update rc.local --- .../overlay/overlay-luckfox-ubuntu/etc/rc.local | 14 +++++++------- 1 file changed, 7 insertions(+), 7 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 8d2f1c7..fe30853 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 @@ -67,13 +67,13 @@ fi #(sleep 5 && cpufreq-set -u 408000 && echo "Boot complete, setting CPU frequency to 408mhz.") & #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 "Using Luckfox CPU S/N to generate nodeid for Meshtastic." -# systemctl daemon-reload -# systemctl enable meshtasticd -# systemctl start meshtasticd -#fi +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." + systemctl daemon-reload + systemctl enable meshtasticd + systemctl start meshtasticd +fi # run USB automount and config tool /usr/local/bin/usbconfig.sh