1
0
mirror of https://github.com/OpenNebula/one.git synced 2025-01-11 05:17:41 +03:00

F #6030: Fix backup_cancel regex match (rsync) (#2627)

This commit is contained in:
Michal Opala 2023-05-29 17:58:16 +02:00 committed by GitHub
parent 4c1e83719d
commit 688b0b70ca
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -68,7 +68,8 @@ begin
script = <<~EOS
set -x -e -o pipefail; shopt -qs failglob
(ps --no-headers -o pid,cmd -C ruby \
| awk '$0 ~ "backup .*#{vm_uuid}" { print $1 } END { print "\\0" }' || :) \\
| awk '$0 !~ "prebackup(_live)? .*#{vm_uuid} " { print }' \
| awk '$0 ~ "backup .*#{vm_uuid} " { print $1 } END { print "\\0" }' || :) \\
| (read -d '' PIDS
[[ -n "$PIDS" ]] || exit 0 # empty
[[ -z "${PIDS//[[:space:][:digit:]]/}" ]] || exit -1 # !integers