diff options
author | wu.zhihui <wu.zhihui1@zte.com.cn> | 2017-03-13 17:16:50 +0800 |
---|---|---|
committer | zhihui wu <zhihui.wu2006+zte@gmail.com> | 2017-03-15 01:41:32 +0000 |
commit | 7fab4cf1fa75d4251369e230f2792df0a16b4019 (patch) | |
tree | 48844a967b6a68dd5240d2f9886a87fa88a87f88 /qtip/scripts/cleanup_creds.sh | |
parent | 3feeebf2165ddec11cd0ee8bf60200961ef48c77 (diff) |
add the cleanup step in runner.py
Add the cleanup step in runner.py
Change-Id: I0016986485eab5d7ab45d4a7a393bea5fb6f96b5
Signed-off-by: wu.zhihui <wu.zhihui1@zte.com.cn>
(cherry picked from commit 57ec2e7a9757cbb1da8a1f73f0c55e8a5cb67bec)
Diffstat (limited to 'qtip/scripts/cleanup_creds.sh')
-rwxr-xr-x | qtip/scripts/cleanup_creds.sh | 11 |
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 |