From fcc146ab43a250f331f677c5a68cf725f179d37f Mon Sep 17 00:00:00 2001 From: juewuy Date: Sun, 9 Feb 2025 13:11:50 +0800 Subject: [PATCH] =?UTF-8?q?~=E7=A6=81=E6=AD=A2=E5=AE=89=E8=A3=85=E5=88=B0t?= =?UTF-8?q?mp|opt|sys=E7=AD=89=E7=9B=AE=E5=BD=95?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 2 +- scripts/init.sh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index f11652c..7bf128d 100644 --- a/install.sh +++ b/install.sh @@ -98,7 +98,7 @@ setdir() { df -h | awk '{print $6,$4}' | sed 1d echo '路径是必须带 / 的格式,注意写入虚拟内存(/tmp,/opt,/sys...)的文件会在重启后消失!!!' read -p "请输入自定义路径 > " dir - if [ "$(dir_avail $dir)" = 0 ]; then + if [ "$(dir_avail $dir)" = 0 ] || [ -n "$(echo $dir |grep -E 'tmp|opt|sys')" ]; then $echo "\033[31m路径错误!请重新设置!\033[0m" set_cust_dir fi diff --git a/scripts/init.sh b/scripts/init.sh index 5db607b..130dd53 100644 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -33,7 +33,7 @@ setdir() { df -h | awk '{print $6,$4}' | sed 1d echo '路径是必须带 / 的格式,注意写入虚拟内存(/tmp,/opt,/sys...)的文件会在重启后消失!!!' read -p "请输入自定义路径 > " dir - if [ "$(dir_avail $dir)" = 0 ]; then + if [ "$(dir_avail $dir)" = 0 ] || [ -n "$(echo $dir |grep -E 'tmp|opt|sys')" ]; then echo "\033[31m路径错误!请重新设置!\033[0m" set_cust_dir fi