1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-03-21 14:50:08 +03:00

B #5678: match any whitespace character(s) (#1686)

Co-authored-by: Anton Todorov <atodorov-storpool@users.noreply.github.com>
This commit is contained in:
Jan Orel 2022-01-05 16:52:34 +01:00 committed by GitHub
parent 23334c8e08
commit ff8d8f83eb
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -24,8 +24,8 @@ TARGET_DEVICE=$2
if [[ -n "$DOMAIN" ]] && [[ -n "$TARGET_DEVICE" ]]
then
disk="$(virsh --connect $LIBVIRT_URI domblklist $DOMAIN | awk "/^$TARGET_DEVICE/ {print \$2; exit}")"
if [[ "$disk" = "-" ]]; then
DISK="$(virsh --connect $LIBVIRT_URI domblklist $DOMAIN | awk "/^\s*$TARGET_DEVICE/ {print \$2; exit}")"
if [[ "$DISK" = "-" ]]; then
log_debug "CDROM already ejected"
exit 0
fi