From 8428602f1912a517113cd49d473e366c753d04ea Mon Sep 17 00:00:00 2001 From: BianTanggui <841018prgray^> Date: Mon, 29 Jun 2020 19:28:09 +0800 Subject: [PATCH] Match-id-494965a6755e5862805420517e67b3b8355bc2ae --- install/deb/scripts/prerm | 6 +++--- install/rpm/ascend-docker-plgugin.spec | 3 +++ 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/install/deb/scripts/prerm b/install/deb/scripts/prerm index 0a97191..ebfb388 100644 --- a/install/deb/scripts/prerm +++ b/install/deb/scripts/prerm @@ -1,10 +1,10 @@ #!/bin/bash DIR=/etc/docker -if [ ! -d "${DIR}" ]; then -mkdir ${DIR} -fi SRC="${DIR}/daemon.json.${PPID}" DST="${DIR}/daemon.json" +if [ ! -f "${DST}" ]; then +exit 0 +fi BINDIR=/usr/bin ${BINDIR}/ascend-docker-plugin-install-helper rm ${DST} ${SRC} if [ "$?" != "0" ]; then diff --git a/install/rpm/ascend-docker-plgugin.spec b/install/rpm/ascend-docker-plgugin.spec index 291dc69..81cf029 100644 --- a/install/rpm/ascend-docker-plgugin.spec +++ b/install/rpm/ascend-docker-plgugin.spec @@ -42,6 +42,9 @@ DIR=/etc/docker BINDIR=/usr/bin SRC="${DIR}/daemon.json.${PPID}" DST="${DIR}/daemon.json" +if [ ! -f "${DST}" ]; then +exit 0 +fi ${BINDIR}/ascend-docker-plugin-install-helper rm ${DST} ${SRC} if [ "$?" != "0" ]; then echo "del damon.json failed\n"