diff options
author | Zhijiang Hu <hu.zhijiang@zte.com.cn> | 2017-02-07 01:38:51 +0000 |
---|---|---|
committer | Gerrit Code Review <gerrit@opnfv.org> | 2017-02-07 01:38:51 +0000 |
commit | 35d0a0c0274dd7a298d691f0afcd8e745ef9f641 (patch) | |
tree | 15ac89ee21bfe70c63ecf712ba607a8ec8a44b74 | |
parent | 809320c2bbe65b9b6c9dfdfdfa31ec4b31c312ba (diff) | |
parent | 9cfa59cf8b75d9ec23800b53f1ebf7728aeb4e82 (diff) |
Merge "Add a judgment in trustme.sh"
-rwxr-xr-x | deploy/trustme.sh | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/deploy/trustme.sh b/deploy/trustme.sh index a0414fd9..38e2d838 100755 --- a/deploy/trustme.sh +++ b/deploy/trustme.sh @@ -48,7 +48,11 @@ fi #clear old public key print_log "clear old info in known_hosts file on localhost ..." -ssh-keygen -R $ip +test ! -f ~/.ssh/known_hosts || ssh-keygen -R $ip +if [ $? != 0 ]; then + print_log "clear old info in known_hosts file on localhost failed" + exit 1 +fi #copy new public key print_log "copy my public key to $ip ..." |