summaryrefslogtreecommitdiff
path: root/test/create-busybox-container
diff options
context:
space:
mode:
authorFranck Bui <fbui@suse.com>2021-08-08 07:35:04 +0200
committerFranck Bui <fbui@suse.com>2021-08-18 17:37:55 +0200
commit5231ec50e90cf175f7294ab7dcedd7c74fd95a02 (patch)
tree2f850bf02d97c212c5ec5bdfdb00a0d960790d86 /test/create-busybox-container
parent6c8ba239d534ebdd124993e7a2e2bbc9d672d695 (diff)
downloadsystemd-5231ec50e90cf175f7294ab7dcedd7c74fd95a02.tar.gz
test: on openSUSE the static linked version of busybox is named "busybox-static"
Diffstat (limited to 'test/create-busybox-container')
-rwxr-xr-xtest/create-busybox-container5
1 files changed, 4 insertions, 1 deletions
diff --git a/test/create-busybox-container b/test/create-busybox-container
index 27897cded2..3ceb23eb91 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)