freebsd-ports/sysutils/rinse/files/patch-scripts.common__20-dev-zero.sh
John Marino 166701d1cc Add new port sysutils/rinse
PR:		193493
Submitted by:	Jan Beich

Rinse is a simple tool which is designed to carry out the installation
of a new RPM-based distribution. Using rinse you can easily setup simple
chroot() systems running different RPM-based distributions, such as
Centos, Scientific Linux or openSUSE.

The purpose and usage are analogous to the 'debootstrap' utility
familiar to users of Debian GNU/Linux. It was primarily designed to
work with the xen-tools software, which creates new guest images for
running inder the Xen hypervisor.
2014-10-31 16:34:20 +00:00

27 lines
860 B
Bash

--- scripts.common/20-dev-zero.sh~
+++ scripts.common/20-dev-zero.sh
@@ -30,15 +30,19 @@ fi
#
# Create the node
#
+if [ ! -e "${prefix}/dev/null" ]; then
+ mount -t devfs none "${prefix}/dev"
+ devfs -m "${prefix}/dev" rule apply hide
+ devfs -m "${prefix}/dev" rule apply path null unhide
+fi
+
if [ ! -e "${prefix}/dev/zero" ]; then
- mknod -m 666 "${prefix}/dev/zero" c 1 5
+ devfs -m "${prefix}/dev" rule apply path zero unhide
fi
if [ ! -e "${prefix}/dev/random" ]; then
- mknod -m 666 "${prefix}/dev/random" c 1 8
- chown root:root "${prefix}/dev/random"
+ devfs -m "${prefix}/dev" rule apply path random unhide
fi
if [ ! -e "${prefix}/dev/urandom" ]; then
- mknod -m 666 "${prefix}/dev/urandom" c 1 9
- chown root:root "${prefix}/dev/urandom"
+ devfs -m "${prefix}/dev" rule apply path urandom unhide
fi