From 264645950bb0eec88ecde7260a1d2c324cfd9264 Mon Sep 17 00:00:00 2001 From: Christian Dresel Date: Sat, 30 Apr 2022 12:33:44 +0200 Subject: [PATCH] fff-web-ui: Show only installed Software Show in the field "Software" in the webui only installed software Check if batman-adv is installed Check if fast is installed Signed-off-by: Christian Dresel --- .../fff/fff-web-ui/files/www/ssl/cgi-bin/home.html | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/home.html b/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/home.html index cd7de58e..3e9bb539 100755 --- a/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/home.html +++ b/src/packages/fff/fff-web-ui/files/www/ssl/cgi-bin/home.html @@ -108,8 +108,12 @@ fi Firmware Version:<%= ${FIRMWARE_VERSION} %> OpenWrt Version:<%= ${DISTRIB_DESCRIPTION} %> Kernel Version:<% uname -s -m -r %> - Batman-Adv Version:<% cat /sys/module/batman_adv/version 2>/dev/null %> - Fastd Version:<% fastd --version 2> /dev/null | cut -d' ' -f 2 %> + <% if [ -e /sys/module/batman_adv/version ] ; then %> + Batman-Adv Version:<% cat /sys/module/batman_adv/version 2>/dev/null %> + <% fi + if [ -f "$(command -v fastd)" ] ; then %> + Fastd Version:<% fastd --version 2> /dev/null | cut -d' ' -f 2 %> + <% fi %>