1
0
mirror of git://sourceware.org/git/lvm2.git synced 2024-12-21 13:34:40 +03:00

tests: aux fallback to sleep

When dbus-send tool is not present on system, fallback to sleep.
This commit is contained in:
Zdenek Kabelac 2024-04-09 00:33:16 +02:00
parent 6a95c66f5b
commit 32c6dbb425

View File

@ -323,11 +323,15 @@ prepare_lvmdbusd() {
local pid=$!
echo -n "## checking lvmdbusd IS running..."
if which dbus-send &>/dev/null ; then
for i in {50..0}; do
dbus-send --system --dest=org.freedesktop.DBus --type=method_call --print-reply /org/freedesktop/DBus org.freedesktop.DBus.ListNames > dbus_services
grep -q com.redhat.lvmdbus1 dbus_services && break
sleep .1
done
else
sleep 2
fi
if [ "$i" -eq 0 ] ; then
printf "\nFailed to serve lvm dBus service in 5 seconds.\n"