2 # SPDX-license-identifier: Apache-2.0
3 ##############################################################################
4 # Copyright (c) 2016 NEC and others.
5 # All rights reserved. This program and the accompanying materials
6 # are made available under the terms of the Apache License, Version 2.0
7 # which accompanies this distribution, and is available at
8 # http://www.apache.org/licenses/LICENSE-2.0
9 ##############################################################################
11 function isinstalled {
12 if rpm -q "$@" >/dev/null 2>&1; then
21 if ! isinstalled gnupg2; then
22 echo "error with install"
27 then echo "error gsutil not installed";
31 if gpg2 --list-keys | grep "opnfv-helpdesk@rt.linuxfoundation.org"; then
32 echo "Key Already available"
34 if [ -z "$NODE_NAME" ];
35 then echo "Cannot find node name"
37 else echo "Importing key for '$NODE_NAME'";
38 gsutil cp gs://opnfv-signing-keys/"$NODE_NAME"-subkey .
39 gpg2 --import "$NODE_NAME"-subkey
40 rm -f "$NODE_NAME"-subkey