From 44c4d99ce90aacd9b0384fbb7ba14a8789bf9ea3 Mon Sep 17 00:00:00 2001 From: vanhofen Date: Sun, 2 Oct 2022 23:17:00 +0200 Subject: [PATCH] y-web: fix mtd_space in Y_Tools.sh Origin commit data ------------------ Commit: https://github.com/neutrino-images/ni-neutrino/commit/ba0999d5cbceedec5652397a559d161e3713e49d Author: vanhofen Date: 2022-10-02 (Sun, 02 Oct 2022) Origin message was: ------------------ - y-web: fix mtd_space in Y_Tools.sh --- data/y-web/scripts/Y_Tools.sh | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/data/y-web/scripts/Y_Tools.sh b/data/y-web/scripts/Y_Tools.sh index 7f8bfe941..499f053fd 100644 --- a/data/y-web/scripts/Y_Tools.sh +++ b/data/y-web/scripts/Y_Tools.sh @@ -531,11 +531,17 @@ case "$1" in res=`wget -O /tmp/$2 "$1" >/tmp/url.log 2>&1` cat /tmp/$2 ;; - mtd_space|var_space) - df | while read fs rest; do + mtd_space) + df | while read filesystem blocks used available percent mounted ; do case ${fs:0:3} in mtd) - echo "$fs" "$rest" + echo "$filesystem" "$blocks" "$used" "$available" "$percent" "$mounted" + break + ;; + esac + case $mounted in + "/") + echo "$filesystem" "$blocks" "$used" "$available" "$percent" "$mounted" break ;; esac