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"