summaryrefslogtreecommitdiffstats
path: root/test/create-busybox-container
diff options
context:
space:
mode:
authorElisei Roca <eroca@suse.de>2020-08-03 17:41:29 +0200
committerElisei Roca <eroca@suse.de>2020-08-03 17:41:29 +0200
commit491b736a49fb9d64b0b515aa773297a30c8bab1d (patch)
treec51bc4f6fe7e6bd7e3fd39c1ea5ad74860569881 /test/create-busybox-container
parenttest: adapt TEST-21-SYSUSERS for SUSE (diff)
downloadsystemd-491b736a49fb9d64b0b515aa773297a30c8bab1d.tar.xz
systemd-491b736a49fb9d64b0b515aa773297a30c8bab1d.zip
test: adapt TEST-13-NSPAWN-SMOKE for SUSE
Diffstat (limited to 'test/create-busybox-container')
-rwxr-xr-xtest/create-busybox-container10
1 files changed, 10 insertions, 0 deletions
diff --git a/test/create-busybox-container b/test/create-busybox-container
index 08fb5d4aa6..3ff14b5fd3 100755
--- a/test/create-busybox-container
+++ b/test/create-busybox-container
@@ -9,6 +9,16 @@ mkdir -p "$root"
mkdir "$root/bin"
cp $(type -P busybox) "$root/bin"
+ID_LIKE=$(awk -F= '$1=="ID_LIKE" { print $2 ;}' /etc/os-release)
+if [[ "$ID_LIKE" = *"suse"* ]]; then
+ mkdir -p "$root/lib"
+ mkdir -p "$root/lib64"
+ for lib in $(find /lib*/ld*); do
+ [[ -d $root/$(dirname $lib) ]] || mkdir -p $root/$(dirname $lib)
+ cp $lib $root/$lib
+ done
+fi
+
mkdir -p "$root/usr/lib"
touch "$root/usr/lib/os-release"