From 4e61869b4a9ad9c144aa332f18265b71304506db Mon Sep 17 00:00:00 2001 From: nagumii Date: Fri, 17 Jan 2025 01:33:29 +0200 Subject: [PATCH] Continued sysinfo --- .../out/rootfs_uclibc_rv1106/usr/local/bin/femto-config | 5 +++-- .../usr/local/bin/femto-meshtasticd-config.sh | 3 ++- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config index e3b8c1d..6adb3d8 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-config @@ -249,12 +249,13 @@ $(lsusb | grep -v 'root hub' | awk 'NR>0{printf "USB: "; for(i=7;i< i2c devices: $i2c_addresses\n\ \n\ Kernel: +Version: $(uname -r) Modules active: $(lsmod | awk 'NR>1 {print $1}' | tr '\n' ' ' && echo)\n\ Boot modules: $boot_modules\n\ \n\ Meshtasticd:\n\ -Service status: $(femto-meshtasticd-config.sh -S)\n\ -$(femto-meshtasticd-config.sh -i)\ +Service status: $(replace_colors "$(femto-meshtasticd-config.sh -S)")\n\ +$(replace_colors "$(femto-meshtasticd-config.sh -i)")\ " echo -e "$info" } diff --git a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-meshtasticd-config.sh b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-meshtasticd-config.sh index 5a20d76..34c190a 100755 --- a/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-meshtasticd-config.sh +++ b/foxbuntu/sysdrv/out/rootfs_uclibc_rv1106/usr/local/bin/femto-meshtasticd-config.sh @@ -80,7 +80,8 @@ while getopts ":higkl:q:va:cpo:sStruxm" opt; do echo -e "\ Version: $(echo "$output" | grep -oP '"firmwareVersion":\s*"\K[^"]+' | head -n 1)\n\ Node name: $(echo "$output" | grep -oP 'Owner:\s*\K.*' | head -n 1)\n\ -NodeID: $(printf "%X\n" $(echo "$output" | grep -oP '"myNodeNum":\s*\K\d+' | head -n 1) | tr '[:upper:]' '[:lower:]') ($(echo "$output" | grep -oP '"myNodeNum":\s*\K\d+' | head -n 1))\n\ +NodeID: $(printf "%08x\n" $(echo "$output" | grep -oP '"myNodeNum":\s*\K\d+' | head -n 1)) ($(echo "$output" | grep -oP '"myNodeNum":\s*\K\d+' | head -n 1))\n\ +TX enabled? $(txEnabled=$(echo "$output" | grep -oP '"txEnabled":\s*\K\w+'); [[ "$txEnabled" == "true" ]] && echo "\033[0;34menabled\033[0m" || echo "\033[0;31mdisabled\033[0m")\n\ Role: $(echo "$output" | grep -oP '"role":\s*"\K[^"]+' | head -n 1)\n\ Preset: $(echo "$output" | grep -oP '"modemPreset":\s*"\K[^"]+')\n\ Region: $(echo "$output" | grep -oP '"region":\s*"\K[^"]+')\n\