Added reporting on network status to rc.local for user info. commented out for now.

This commit is contained in:
nagumii 2024-11-21 01:17:07 +02:00
parent ab8d4fc6b0
commit fd8a2863e0
2 changed files with 14 additions and 1 deletions

View file

@ -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"

View file

@ -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"