Do not try to create /dev nodes under chroot/bwrap
This commit is contained in:
parent
9ed4ae9a59
commit
1481ad0d20
|
@ -15,6 +15,15 @@ test -c "/dev/urandom" || mknod -m 444 "/dev/urandom" c 1 9
|
|||
test -c "/dev/ptmx" || mknod -m 666 "/dev/ptmx" c 5 2
|
||||
test -c "/dev/tty" || mknod -m 666 "/dev/tty" c 5 0
|
||||
|
||||
test -e "/dev/stdout" || ln -s "/proc/self/fd/1" "/dev/stdout"
|
||||
|
||||
if mount --version >/dev/null 2>&1; then
|
||||
test -d "/dev/shm" || (mkdir /dev/shm && mount -t tmpfs tmpfs /dev/shm)
|
||||
test -d "/proc" || (mkdir /proc && mount -t proc proc /proc)
|
||||
fi
|
||||
|
||||
if [ "${CHROOT}" = False ]; then
|
||||
test -c "/dev/console" || mknod -m 666 "/dev/console" c 5 1
|
||||
test -b "/dev/sda" || mknod -m 600 "/dev/sda" b 8 0
|
||||
test -b "/dev/sda1" || mknod -m 600 "/dev/sda1" b 8 1
|
||||
test -b "/dev/sda2" || mknod -m 600 "/dev/sda2" b 8 2
|
||||
|
@ -27,14 +36,4 @@ test -b "/dev/sdc" || mknod -m 600 "/dev/sdc" b 8 32
|
|||
test -b "/dev/sdc1" || mknod -m 600 "/dev/sdc1" b 8 33
|
||||
test -b "/dev/sdc2" || mknod -m 600 "/dev/sdc2" b 8 34
|
||||
test -b "/dev/sdc3" || mknod -m 600 "/dev/sdc3" b 8 35
|
||||
|
||||
test -e "/dev/stdout" || ln -s "/proc/self/fd/1" "/dev/stdout"
|
||||
|
||||
if mount --version >/dev/null 2>&1; then
|
||||
test -d "/dev/shm" || (mkdir /dev/shm && mount -t tmpfs tmpfs /dev/shm)
|
||||
test -d "/proc" || (mkdir /proc && mount -t proc proc /proc)
|
||||
fi
|
||||
|
||||
if [ "${CHROOT}" = False ]; then
|
||||
test -c "/dev/console" || mknod -m 666 "/dev/console" c 5 1
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue