summaryrefslogtreecommitdiffstats
path: root/qtip/scripts/cleanup_creds.sh
diff options
context:
space:
mode:
authorYujun Zhang <zhang.yujunz@zte.com.cn>2017-03-15 01:51:49 +0000
committerGerrit Code Review <gerrit@opnfv.org>2017-03-15 01:51:49 +0000
commit831fc9ca1e1c6b98d5359f3c3c3c8153c9213be8 (patch)
tree20037cb77e03eb9c5d1f346e4030f381e7d46850 /qtip/scripts/cleanup_creds.sh
parent9fc7b928108e70e77dc2d9caf2b5b19a77251788 (diff)
parent7fab4cf1fa75d4251369e230f2792df0a16b4019 (diff)
Merge "add the cleanup step in runner.py" into stable/danube
Diffstat (limited to 'qtip/scripts/cleanup_creds.sh')
-rwxr-xr-xqtip/scripts/cleanup_creds.sh11
1 files changed, 10 insertions, 1 deletions
diff --git a/qtip/scripts/cleanup_creds.sh b/qtip/scripts/cleanup_creds.sh
index b4eee924..1a7ddc1a 100755
--- a/qtip/scripts/cleanup_creds.sh
+++ b/qtip/scripts/cleanup_creds.sh
@@ -1,11 +1,20 @@
#! /bin/bash
+##############################################################################
+# Copyright (c) 2017 ZTE corp. and others.
+#
+# All rights reserved. This program and the accompanying materials
+# are made available under the terms of the Apache License, Version 2.0
+# which accompanies this distribution, and is available at
+# http://www.apache.org/licenses/LICENSE-2.0
+##############################################################################
DEST_IP=$1
+PRIVATE_KEY=$2
HOSTNAME=$(hostname)
sshoptions="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null"
case "$INSTALLER_TYPE" in
fuel)
- ssh $sshoptions -i ./config/QtipKey root@$DEST_IP "sed -i '/root@$HOSTNAME/d' /root/.ssh/authorized_keys"
+ ssh $sshoptions -i $PRIVATE_KEY root@$DEST_IP "sed -i '/root@$HOSTNAME/d' /root/.ssh/authorized_keys"
;;
esac