From: Franck Bui Date: Sun, 8 Aug 2021 05:35:04 +0000 (+0200) Subject: test: on openSUSE the static linked version of busybox is named "busybox-static" X-Git-Tag: v250-rc1~803^2~3 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=5231ec50e90cf175f7294ab7dcedd7c74fd95a02;p=thirdparty%2Fsystemd.git test: on openSUSE the static linked version of busybox is named "busybox-static" --- diff --git a/test/TEST-13-NSPAWN-SMOKE/test.sh b/test/TEST-13-NSPAWN-SMOKE/test.sh index 8455cc60adf..faba5ba0c49 100755 --- a/test/TEST-13-NSPAWN-SMOKE/test.sh +++ b/test/TEST-13-NSPAWN-SMOKE/test.sh @@ -11,7 +11,10 @@ TEST_NO_NSPAWN=1 test_append_files() { ( local workspace="${1:?}" - dracut_install busybox + + # On openSUSE the static linked version of busybox is named "busybox-static". + busybox="$(type -P busybox-static || type -P busybox)" + inst_simple "$busybox" "$(dirname $busybox)/busybox" if selinuxenabled >/dev/null; then dracut_install selinuxenabled diff --git a/test/create-busybox-container b/test/create-busybox-container index 27897cded2b..3ceb23eb91a 100755 --- a/test/create-busybox-container +++ b/test/create-busybox-container @@ -7,7 +7,10 @@ set -o pipefail root="${1:?Usage $0 container-root}" mkdir -p "$root" mkdir "$root/bin" -cp $(type -P busybox) "$root/bin" + +# On openSUSE the static linked version of busybox is named "busybox-static". +busybox="$(type -P busybox-static || type -P busybox)" +cp "$busybox" "$root/bin/busybox" os_release=$(test -e /etc/os-release && echo /etc/os-release || echo /usr/lib/os-release) ID_LIKE=$(awk -F= '$1=="ID_LIKE" { print $2 ;}' $os_release)