]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
test: on openSUSE the static linked version of busybox is named "busybox-static"
authorFranck Bui <fbui@suse.com>
Sun, 8 Aug 2021 05:35:04 +0000 (07:35 +0200)
committerFranck Bui <fbui@suse.com>
Wed, 18 Aug 2021 15:37:55 +0000 (17:37 +0200)
test/TEST-13-NSPAWN-SMOKE/test.sh
test/create-busybox-container

index 8455cc60adf664aa9f99fa2d14a57da4d74a0ae4..faba5ba0c49282866765da5335f46e98f5c9a279 100755 (executable)
@@ -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
index 27897cded2b1a0e17318d0ae578a81bb5cefab39..3ceb23eb91a3213f31cb2422f1070f5724e9e9cf 100755 (executable)
@@ -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)