/usr/lib/rinse/common/20-dev-zero.sh is in rinse 3.1.1.
This file is owned by root:root, with mode 0o755.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 | #!/bin/sh
#
# Ensure the chroot has /dev/zero
#
# Steve
# --
#
# Get the root of the chroot.
#
prefix=$1
#
# Ensure it exists.
#
if [ ! -d "${prefix}" ]; then
echo "Serious error - the named directory doesn't exist."
exit
fi
#
# Ensure we have /dev
#
if [ ! -d "${prefix}/dev" ]; then
mkdir "${prefix}/dev"
fi
#
# Create the node
#
if [ ! -e "${prefix}/dev/zero" ]; then
mknod -m 666 "${prefix}/dev/zero" c 1 5
fi
if [ ! -e "${prefix}/dev/random" ]; then
mknod -m 666 "${prefix}/dev/random" c 1 8
chown root:root "${prefix}/dev/random"
fi
if [ ! -e "${prefix}/dev/urandom" ]; then
mknod -m 666 "${prefix}/dev/urandom" c 1 9
chown root:root "${prefix}/dev/urandom"
fi
|