mirror of
git://sourceware.org/git/lvm2.git
synced 2025-01-18 10:04:20 +03:00
tests: udev-pvscan-vgchange fix wait
the service now remains after completion
This commit is contained in:
parent
0e0faf30e0
commit
20c550ab10
@ -71,15 +71,11 @@ wipe_all() {
|
|||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
|
||||||
# udevadm trigger runs udev rule which runs systemd-run --no-wait vgchange -aay
|
|
||||||
# Because of --no-wait, we need to wait for the transient systemd
|
|
||||||
# service to be gone before checking the effects of the vgchange.
|
|
||||||
|
|
||||||
wait_lvm_activate() {
|
wait_lvm_activate() {
|
||||||
local vgw=$1
|
local vgw=$1
|
||||||
local wait=0
|
local wait=0
|
||||||
|
|
||||||
while systemctl status lvm-activate-$vgw > /dev/null && test "$wait" -le 30; do
|
while systemctl status lvm-activate-$vgw | grep "active (running)" && test "$wait" -le 30; do
|
||||||
sleep .2
|
sleep .2
|
||||||
wait=$(( wait + 1 ))
|
wait=$(( wait + 1 ))
|
||||||
done
|
done
|
||||||
|
Loading…
x
Reference in New Issue
Block a user