]> git.ipfire.org Git - thirdparty/systemd.git/blobdiff - test/create-busybox-container
scope: on unified, make sure to unwatch all PIDs once they've been moved to the cgrou...
[thirdparty/systemd.git] / test / create-busybox-container
index 08fb5d4aa6d75aa24a88f799901282c53f6c743b..5ded42950a94efd1ff3c7a1c72c03ff2a16f4e79 100755 (executable)
@@ -9,6 +9,17 @@ mkdir -p "$root"
 mkdir "$root/bin"
 cp $(type -P busybox) "$root/bin"
 
+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)
+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"