From fd8a2863e02d2c149477006cd8630a5fce39054e Mon Sep 17 00:00:00 2001 From: nagumii Date: Thu, 21 Nov 2024 01:17:07 +0200 Subject: [PATCH] Added reporting on network status to rc.local for user info. commented out for now. --- scripts/luckfox-install.sh | 2 +- scripts/rc.local | 13 +++++++++++++ 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/scripts/luckfox-install.sh b/scripts/luckfox-install.sh index 2168267..d320f00 100644 --- a/scripts/luckfox-install.sh +++ b/scripts/luckfox-install.sh @@ -73,7 +73,7 @@ echo "*** $(date "+%H:%M:%S %Z"): Disabled redundant services ***\e[0m\n" echo "*** $(date "+%H:%M:%S %Z"): Changing Luckfox system config ***\e[0m\n" sudo mv luckfox.cfg /etc/ sudo luckfox-config load -echo "*** $(date "+%H:%M:%S %Z"): Set Luckfox system config ***\e[0m\n" +echo "*** $(date "+%H:%M:%S %Z"): Set and loaded Luckfox system config ***\e[0m\n" sudo hostname femtofox echo "*** $(date "+%H:%M:%S %Z"): Set hostname to femtofox ***\e[0m\n" diff --git a/scripts/rc.local b/scripts/rc.local index 6b0bdb3..f7cd88c 100644 --- a/scripts/rc.local +++ b/scripts/rc.local @@ -14,6 +14,19 @@ echo 'ds1307 0x68' | sudo tee /sys/class/i2c-adapter/i2c-3/new_device > /dev/nul # activating USER LED echo 34 > /sys/class/gpio/export && echo out > /sys/class/gpio/gpio34/direction & +# ( +# if ip addr show wlan0 | grep -q 'inet '; then + # echo "Wifi (wlan0) is online"; +# else + # echo "Wifi (wlan0) is offline"; +# fi +# if ip addr show eth0 | grep -q 'inet '; then + # echo "Built-in ethernet (eth0) is online"; +# else + # echo "Built-in ethernet (eth0) is offline"; +# fi +# ) & + #if RTC recognized if ls /dev/rtc* 1> /dev/null 2>&1; then rtc="true"