diff options
author | Sergio Lindo Mansilla <slindomansilla@suse.com> | 2018-05-18 16:24:36 +0200 |
---|---|---|
committer | Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl> | 2018-05-30 18:13:14 +0200 |
commit | c2f32f616bf0530c5b8198e69144d590f03a17c0 (patch) | |
tree | c4412dce888f49783f7203cae2fadc3f792a6eee /test | |
parent | e6ebebbe6aef5830793af515c2e3a998bde920b9 (diff) | |
download | systemd-c2f32f616bf0530c5b8198e69144d590f03a17c0.tar.gz |
Fix pattern to detect distribution
With operator '=', when in /etc/os-release:
ID_LIKE="opensuse suse" # Tumbleweed since at least 2018-04-24
or
ID_LIKE="suse opensuse" # Leap 15
Diffstat (limited to 'test')
-rw-r--r-- | test/test-functions | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/test/test-functions b/test/test-functions index cc9b025dca..6535099047 100644 --- a/test/test-functions +++ b/test/test-functions @@ -4,9 +4,9 @@ PATH=/sbin:/bin:/usr/sbin:/usr/bin export PATH -LOOKS_LIKE_DEBIAN=$(source /etc/os-release && [[ "$ID" = "debian" || "$ID_LIKE" = "debian" ]] && echo yes || true) -LOOKS_LIKE_ARCH=$(source /etc/os-release && [[ "$ID" = "arch" ]] && echo yes || true) -LOOKS_LIKE_SUSE=$(source /etc/os-release && [[ "$ID_LIKE" = "suse" ]] && echo yes || true) +LOOKS_LIKE_DEBIAN=$(source /etc/os-release && [[ "$ID" = "debian" || " $ID_LIKE " = *" debian "* ]] && echo yes || true) +LOOKS_LIKE_ARCH=$(source /etc/os-release && [[ "$ID" = "arch" || " $ID_LIKE " = *" arch "* ]] && echo yes || true) +LOOKS_LIKE_SUSE=$(source /etc/os-release && [[ " $ID_LIKE " = *" suse "* ]] && echo yes || true) KERNEL_VER=${KERNEL_VER-$(uname -r)} KERNEL_MODS="/lib/modules/$KERNEL_VER/" QEMU_TIMEOUT="${QEMU_TIMEOUT:-infinity}" |