From 0c367799b70095488ae77750d690a4012bfbf832 Mon Sep 17 00:00:00 2001 From: shenmo Date: Mon, 8 Aug 2022 04:35:58 +0000 Subject: [PATCH] =?UTF-8?q?!70=20=E4=BF=AE=E5=A4=8D=EF=BC=9Assinstall?= =?UTF-8?q?=E5=9C=A8=E6=B2=A1=E6=9C=89=E5=AE=89=E8=A3=85apt-fast=E7=9A=84?= =?UTF-8?q?=E6=83=85=E5=86=B5=E4=B8=8B=E9=A6=96=E6=AC=A1=E5=AE=89=E8=A3=85?= =?UTF-8?q?=E9=9C=80=E8=A6=81=E4=BE=9D=E8=B5=96=E7=9A=84=E8=BD=AF=E4=BB=B6?= =?UTF-8?q?=E6=97=B6=E5=AE=89=E8=A3=85=E5=A4=B1=E8=B4=A5=20*=20=09?= =?UTF-8?q?=E4=BF=AE=E6=94=B9=EF=BC=9A=20=20=20=20=20debian/changelog=20*?= =?UTF-8?q?=20=E4=BF=AE=E5=A4=8D=EF=BC=9Assinstall=E5=9C=A8=E6=B2=A1?= =?UTF-8?q?=E6=9C=89=E5=AE=89=E8=A3=85apt-fast=E7=9A=84=E6=83=85=E5=86=B5?= =?UTF-8?q?=E4=B8=8B=E9=A6=96=E6=AC=A1=E5=AE=89=E8=A3=85=E9=9C=80=E8=A6=81?= =?UTF-8?q?=E4=BE=9D=E8=B5=96=E7=9A=84=E8=BD=AF=E4=BB=B6=E6=97=B6=E5=AE=89?= =?UTF-8?q?=E8=A3=85=E5=A4=B1=E8=B4=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- debian/changelog | 2 +- tool/ss-apt-fast | 2 +- tool/ssinstall | 12 ++++++++++-- 3 files changed, 12 insertions(+), 4 deletions(-) diff --git a/debian/changelog b/debian/changelog index 7351f6b..2cba1f9 100644 --- a/debian/changelog +++ b/debian/changelog @@ -1,7 +1,7 @@ spark-store (3.1.4-1) stable; urgency=medium * 安装脚本和检测更新脚本检查网络时间超时时间延长至5s - + * 修复:ssinstall在没有安装apt-fast的情况下首次安装需要依赖的软件时安装失败 -- shenmo Fri, 30 Jan 2022 00:00:00 +0800 diff --git a/tool/ss-apt-fast b/tool/ss-apt-fast index ca6293c..fd619ee 100755 --- a/tool/ss-apt-fast +++ b/tool/ss-apt-fast @@ -18,7 +18,7 @@ chmod -R 755 /tmp/ss-apt-fast-conf DEPEND=`which apt-fast` if [ "$DEPEND" = "" ] ; then echo "未安装依赖:apt-fast 开始安装" -sudo bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt update && sudo bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt install apt-fast -y +sudo ss-apt-fast ssupdate && sudo bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt install apt-fast -y fi ###执行安装 bwrap --dev-bind / / \ diff --git a/tool/ssinstall b/tool/ssinstall index e57a6c9..34d0932 100755 --- a/tool/ssinstall +++ b/tool/ssinstall @@ -47,7 +47,12 @@ isuos=`cat /etc/os-release | grep UnionTech` if [ "$(id -u)" != "0" ];then #############################无root权限时 +IS_INSTALLED=`which apt-fast` +if [ "$IS_INSTALLED" = "" ] ; then +echo "未安装依赖:apt-fast 开始安装" +echo "$upass" | sudo -S /usr/local/bin/ss-apt-fast ssupdate && echo "$upass" | sudo -S bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt install apt-fast -y +fi if [ "$DEPEND" != "" ] && [ "$isuos" != "" ]; then echo "UOS中系统依赖无法使用第三方下载工具,放弃使用apt-fast" @@ -70,8 +75,11 @@ fi else ###########################有root权限时 - - +IS_INSTALLED=`which apt-fast` +if [ "$IS_INSTALLED" = "" ] ; then +echo "未安装依赖:apt-fast 开始安装" +/usr/local/bin/ss-apt-fast ssupdate && bwrap --dev-bind / / --bind '/opt/durapps/spark-store/bin/apt-fast-conf/sources.list.d/sparkstore.list' /etc/apt/sources.list.d/sparkstore.list apt install apt-fast -y +fi if [ "$DEPEND" != "" ] && [ "$isuos" != "" ]; then echo "UOS中系统依赖无法使用第三方下载工具,放弃使用apt-fast"