diff --git a/common/dialog.sh b/common/dialog.sh index 0cb3890c..44f78c41 100644 --- a/common/dialog.sh +++ b/common/dialog.sh @@ -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" ] } diff --git a/common/installer.sh b/common/installer.sh index 36aed86e..453a70ad 100644 --- a/common/installer.sh +++ b/common/installer.sh @@ -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() { diff --git a/install_easy.sh b/install_easy.sh index 216cce0c..f35e977a 100755 --- a/install_easy.sh +++ b/install_easy.sh @@ -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" && {