-MAKEDEV ()
-{
- if grep -q %{installroot}/dev/pts /proc/mounts ; then
- umount %{installroot}/dev/pts
- fi
- rm -rf %{installroot}/dev
- mkdir -p %{installroot}/dev
- mknod -m 666 %{installroot}/dev/null c 1 3
- mknod -m 666 %{installroot}/dev/zero c 1 5
- mknod -m 666 %{installroot}/dev/full c 1 7
- mknod -m 644 %{installroot}/dev/random c 1 8
- mknod -m 644 %{installroot}/dev/urandom c 1 9
- mknod -m 666 %{installroot}/dev/tty c 5 0
- mknod -m 666 %{installroot}/dev/ptmx c 5 2
- touch %{installroot}/dev/hdv1
-}
-
-# Initialize /dev in reference image
-MAKEDEV
-
-# Mount /dev/pts in reference image
-mkdir -p %{installroot}/dev/pts
-mount -t devpts none %{installroot}/dev/pts
-
-# Mount /proc in reference image
-mkdir -p %{installroot}/proc
-mount -t proc none %{installroot}/proc
-
-# Create a dummy /etc/fstab in reference image
-mkdir -p %{installroot}/etc
-cat > %{installroot}/etc/fstab <<EOF
-# This fake fstab exists only to please df and linuxconf.
-/dev/hdv1 / ext2 defaults 1 1
-EOF