From 9229fa1e7a65a84916bcc512af96b654e002238b Mon Sep 17 00:00:00 2001 From: juewuy Date: Wed, 8 Jun 2022 11:38:20 +0800 Subject: [PATCH] =?UTF-8?q?v1.6.3=20~=E8=87=AA=E5=8A=A8=E5=8A=A0=E8=BD=BD?= =?UTF-8?q?=E6=9C=AC=E6=9C=BAhosts=E5=8A=9F=E8=83=BD=EF=BC=8C=E4=B8=8D?= =?UTF-8?q?=E5=86=8D=E5=8A=A0=E8=BD=BDipv6=E5=9C=B0=E5=9D=80=20~=E8=87=AA?= =?UTF-8?q?=E5=8A=A8=E6=9B=B4=E6=96=B0=E9=85=8D=E7=BD=AE=E6=96=87=E4=BB=B6?= =?UTF-8?q?=E5=8A=9F=E8=83=BD=E6=94=B9=E4=B8=BA=E5=90=8E=E5=8F=B0=E5=88=B7?= =?UTF-8?q?=E6=96=B0=E4=B8=8D=E5=86=8D=E8=87=AA=E5=8A=A8=E9=87=8D=E5=90=AF?= =?UTF-8?q?=E6=9C=8D=E5=8A=A1=20~=E4=BF=AE=E5=A4=8D=E6=A2=85=E6=9E=97?= =?UTF-8?q?=E8=AE=BE=E5=A4=87=E5=AE=89=E8=A3=85=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- install.sh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/install.sh b/install.sh index f840a4c..c3bf312 100644 --- a/install.sh +++ b/install.sh @@ -17,8 +17,11 @@ setconfig(){ [ -n "$(grep ${1} $configpath)" ] && sed -i "s#${1}=.*#${1}=${2}#g" $configpath || echo "${1}=${2}" >> $configpath } [ -f "/etc/storage/started_script.sh" ] && systype=Padavan && initdir='/etc/storage/started_script.sh' -[ -d "/jffs/scripts" ] && systype=asusrouter && initdir='/jffs/scripts/net-start' -[ -f "/jffs/.asusrouter" ] && systype=asusrouter && initdir='/jffs/.asusrouter' +[ -d "/jffs" ] && systype=asusrouter && { + [ -f "/jffs/.asusrouter" ] && initdir='/jffs/.asusrouter' + [ -d "/jffs/scripts" ] && initdir='/jffs/scripts/nat-start' + [ -z "$initdir" ] && initdir='/jffs/scripts/nat-start' && mkdir -p '/jffs/scripts' + } [ -f "/data/etc/crontabs/root" -a "$(dir_avail /etc)" = 0 ] && systype=mi_snapshot #检查root权限 if [ "$USER" != "root" -a -z "$systype" ];then