diff options
author | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2017-08-29 02:36:41 +0200 |
---|---|---|
committer | Alexandru Avadanii <Alexandru.Avadanii@enea.com> | 2017-08-29 02:36:41 +0200 |
commit | c994e65fa0fac7bf2c5bb199763990623d528286 (patch) | |
tree | 25cdbd70968aeefc8d967b3b418afe19b50bb1a9 /patches | |
parent | 7df5e174d0cf4d9c64d1a52d2845cc868e119c72 (diff) |
p/fuel: lib.sh: Reuse /tmp/mcp.rsa if present
Change-Id: Ia46097b3a0e5bb155e8a2e979aaf9eea50f6bcfb
Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com>
Diffstat (limited to 'patches')
-rw-r--r-- | patches/opnfv-fuel/0022-lib.sh-Reuse-tmp-mcp.rsa-if-present.patch | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/patches/opnfv-fuel/0022-lib.sh-Reuse-tmp-mcp.rsa-if-present.patch b/patches/opnfv-fuel/0022-lib.sh-Reuse-tmp-mcp.rsa-if-present.patch new file mode 100644 index 00000000..3943fb39 --- /dev/null +++ b/patches/opnfv-fuel/0022-lib.sh-Reuse-tmp-mcp.rsa-if-present.patch @@ -0,0 +1,25 @@ +From: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +Date: Tue, 29 Aug 2017 02:35:37 +0200 +Subject: [PATCH] lib.sh: Reuse /tmp/mcp.rsa if present + +Signed-off-by: Alexandru Avadanii <Alexandru.Avadanii@enea.com> +--- + mcp/scripts/lib.sh | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/mcp/scripts/lib.sh b/mcp/scripts/lib.sh +index de7b9ec..33ec8b0 100644 +--- a/mcp/scripts/lib.sh ++++ b/mcp/scripts/lib.sh +@@ -9,6 +9,11 @@ generate_ssh_key() { + user=${SUDO_USER} + fi + ++ if [ -f "/tmp/${SSH_KEY}" ]; then ++ cp "/tmp/${SSH_KEY}" . ++ ssh-keygen -f "${SSH_KEY}" -y > "${SSH_KEY}.pub" ++ fi ++ + [ -f "${SSH_KEY}" ] || ssh-keygen -f "${SSH_KEY}" -N '' + install -o "${user}" -m 0600 "${SSH_KEY}" /tmp/ + } |