]> git.ipfire.org Git - ipfire-2.x.git/commitdiff
Revert "make.sh: Bind-mount all loop devices"
authorMichael Tremer <michael.tremer@ipfire.org>
Thu, 12 Sep 2024 09:07:02 +0000 (09:07 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 12 Sep 2024 09:07:02 +0000 (09:07 +0000)
This reverts commit 7ad12edfb0d233498410f2afc09753e70de50f80.

This patch does not fix the original problem and still leaves the build
environment without usable loop devices.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index e8c3b0827881e8ea0a04654a88169134f3222cde..21543c667e80fd08c5d916c0c4a7e7c832a17017 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -447,19 +447,14 @@ prepareenv() {
 
        # Create loop devices
        mknod -m 666 "${BUILD_DIR}/dev/loop-control"    c  10 237
-
-       local loop
-
-       # Copy all loop devices from the host
-       for loop in /dev/loop*; do
-               if [ -b "${loop}" ]; then
-                       # Create the mountpoint
-                       : > "${BUILD_DIR}${loop}"
-
-                       # Bind-mount the device
-                       mount --bind  "${loop}" "${BUILD_DIR}${loop}"
-               fi
-       done
+       mknod -m 666 "${BUILD_DIR}/dev/loop0"                   b   7   0
+       mknod -m 666 "${BUILD_DIR}/dev/loop1"                   b   7   1
+       mknod -m 666 "${BUILD_DIR}/dev/loop2"                   b   7   2
+       mknod -m 666 "${BUILD_DIR}/dev/loop3"                   b   7   3
+       mknod -m 666 "${BUILD_DIR}/dev/loop4"                   b   7   4
+       mknod -m 666 "${BUILD_DIR}/dev/loop5"                   b   7   5
+       mknod -m 666 "${BUILD_DIR}/dev/loop6"                   b   7   6
+       mknod -m 666 "${BUILD_DIR}/dev/loop7"                   b   7   7
 
        # Create directories
        mkdir -p "${BUILD_DIR}/dev/pts"