mirror of
https://github.com/ceph/ceph
synced 2025-01-08 12:10:20 +00:00
3aae5ca6fd
/bin/bash is a Linuxism. Other operating systems install bash to different paths. Use /usr/bin/env in shebangs to find bash. Signed-off-by: Alan Somers <asomers@gmail.com>
20 lines
422 B
Bash
Executable File
20 lines
422 B
Bash
Executable File
#!/usr/bin/env bash
|
|
set -f
|
|
|
|
#
|
|
# Generate a libvirt secret on the Openstack node.
|
|
#
|
|
openstack_node=${1}
|
|
uuid=`uuidgen`
|
|
cat > secret.xml <<EOF
|
|
<secret ephemeral='no' private='no'>
|
|
<uuid>${uuid}</uuid>
|
|
<usage type='ceph'>
|
|
<name>client.cinder secret</name>
|
|
</usage>
|
|
</secret>
|
|
EOF
|
|
sudo virsh secret-define --file secret.xml
|
|
sudo virsh secret-set-value --secret ${uuid} --base64 $(cat client.cinder.key)
|
|
echo ${uuid}
|