summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
authorzhuzeyu <zhu.zeyu@zte.com.cn>2017-01-16 20:31:53 +0800
committerzhuzeyu <zhu.zeyu@zte.com.cn>2017-02-06 12:47:29 +0800
commit9cfa59cf8b75d9ec23800b53f1ebf7728aeb4e82 (patch)
tree8a500600ce79c4a85ac8a0927ab0b437672f9a34 /deploy
parentb40b7d7c6770fc3f1f39f9b7b576a88c1ce87864 (diff)
Add a judgment in trustme.sh
To check whether the script runs successful Change-Id: I0ae4e01d845690cb6c19f95f0950cd98ebd1338c Signed-off-by: zhuzeyu <zhu.zeyu@zte.com.cn>
Diffstat (limited to 'deploy')
-rwxr-xr-xdeploy/trustme.sh6
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 ..."