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

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

Co-authored-by: Anton Todorov <atodorov-storpool@users.noreply.github.com>
(cherry picked from commit cf26a33ca1a696b650a9c0c57b17c534c2156a29)
This commit is contained in:
Jan Orel 2022-01-05 16:45:45 +01:00 committed by Ruben S. Montero
parent d498c4831f
commit 074bced8b4
No known key found for this signature in database
GPG Key ID: A0CEA6FA880A1D87

View File

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