diff --git a/build/scripts/run_main.sh b/build/scripts/run_main.sh index e033c38ea77dcb86206527341cc1bbda40f0870c..315131ab5afeb28e9f6b459d6a7a68ff70a8ce02 100644 --- a/build/scripts/run_main.sh +++ b/build/scripts/run_main.sh @@ -164,11 +164,8 @@ function install() SRC="${DOCKER_CONFIG_DIR}/daemon.json.${PPID}" DST="${DOCKER_CONFIG_DIR}/daemon.json" - ./ascend-docker-plugin-install-helper add ${DST} ${SRC} ${INSTALL_PATH}/ascend-docker-runtime ${RESERVEDEFAULT} >> ${INSTALL_LOG_PATH} 2>&1 - if [ "$?" != "0" ]; then - echo "[ERROR]: create damon.json failed, you could check ${INSTALL_LOG_PATH} for detail" - exit 1 - fi + # exit when return code is not 0, if use 'set -e' + ./ascend-docker-plugin-install-helper add ${DST} ${SRC} ${INSTALL_PATH}/ascend-docker-runtime ${RESERVEDEFAULT} > /dev/null mv ${SRC} ${DST} chmod 600 ${DST} diff --git a/install/deb/src/main.go b/install/deb/src/main.go index 3464f3a4402835bc129230dad41ae08ce8dae3ba..4958d6ed5847d21471e787a4571fd2c9a5a04107 100644 --- a/install/deb/src/main.go +++ b/install/deb/src/main.go @@ -79,8 +79,8 @@ func main() { if !mindxcheckutils.StringChecker(strings.Join(os.Args, " "), 0, maxCommandLength, mindxcheckutils.DefaultWhiteList+" ") { - hwlog.OpLog.Infof("%v run failed", logPrefixWords) - log.Fatal("command error") + hwlog.OpLog.Errorf("%v check command failed, maybe command contains illegal char", logPrefixWords) + log.Fatalf("command error, please check %s for detail", logPath) } err, behavior := process()