AI inspired fixes

This commit is contained in:
bol-van
2026-01-12 20:37:37 +03:00
parent c8cb9faf27
commit 75d2f1195d
3 changed files with 4 additions and 5 deletions

View File

@@ -37,8 +37,7 @@ ask_list()
local M_DEFAULT
eval M_DEFAULT="\$$1"
local M_ALL=$M_DEFAULT
local M=""
local m
local M="" m
[ -n "$3" ] && { find_str_in_list "$M_DEFAULT" "$2" || M_DEFAULT="$3" ;}
@@ -54,5 +53,5 @@ ask_list()
echo selected : $M
eval $1="\"$M\""
[ "$M" != "$M_OLD" ]
[ "$M" != "$M_DEFAULT" ]
}

View File

@@ -256,7 +256,7 @@ check_system()
get_free_space_mb()
{
df -m $PWD | awk '/[0-9]%/{print $(NF-2)}'
df -m "$1" | awk '/[0-9]%/{print $(NF-2)}'
}
get_ram_kb()
{

View File

@@ -323,7 +323,7 @@ ask_config_tmpdir()
echo /tmp in openwrt is tmpfs. on low RAM systems there may be not enough RAM to store downloaded files
echo default tmpfs has size of 50% RAM
echo "RAM : $(get_ram_mb) Mb"
echo "DISK : $(get_free_space_mb) Mb"
echo "DISK : $(get_free_space_mb "$EXEDIR/tmp") Mb"
echo select temp file location
[ -z "$TMPDIR" ] && TMPDIR=/tmp
ask_list TMPDIR "/tmp $EXEDIR/tmp" && {