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:
parent
6a95c66f5b
commit
32c6dbb425
@ -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"
|
||||
|
Loading…
Reference in New Issue
Block a user