test: udev might not be running in container, skip check in TEST-88-UPGRADE
This commit is contained in:
@@ -37,8 +37,13 @@ fi
|
||||
minor=$(systemctl --version | awk '/^systemd/{print$2}')
|
||||
networkd=
|
||||
resolved=
|
||||
udev=
|
||||
unitscmd='systemctl list-units --failed *systemd*'
|
||||
|
||||
if command -v udevadm >/dev/null && systemctl is-active --quiet systemd-udevd.service; then
|
||||
udev=1
|
||||
fi
|
||||
|
||||
if [[ $($unitscmd --output json | jq length) -gt 0 ]]; then
|
||||
echo 'Systemd failed units found before the test:'
|
||||
$unitscmd
|
||||
@@ -58,7 +63,7 @@ check_sd() {
|
||||
fail=1
|
||||
fi
|
||||
|
||||
if command -v udevadm >/dev/null && ! udevadm control --ping --timeout=5; then
|
||||
if [[ -n $udev ]] && ! udevadm control --ping --timeout=5; then
|
||||
echo 'Udev failed after the test!'
|
||||
fail=1
|
||||
fi
|
||||
|
||||
Reference in New Issue
Block a user