#!/bin/bash

echo "/dev/pts$ VarDir"
echo "!/dev/pts/[0-9]{1,2}$"

if [ -e /dev/.udev ]; then
  # we have udev

  # We generate a RamdiskData entry for each file found in /dev (as
  # these files change inode and mtim/ctime at each boot anyway).
  # /dev/.static is excluded as this is bind-mounted from the persistent
  # root /dev, which should be a lot more static.

  # Making this any more paranoid would probably mean to implementing most
  # of udev. Please feel free to submit patches ;)

  # -path is -wholename on sid, but -path still works on sarge and sid
  find /dev -path /dev/.static -prune -o -print | \
     sed 's/^\(.*\)/\1$ RamdiskData/'
  echo "/dev/.static$ RamdiskData"
else
  # we have static /dev
  cat <<EOF
DevTty        = Size+n+i
DevPtmx       = InodeData+Checksums+c

/dev/ptmx$ DevPtmx
/dev/(x?console|tty[a-z]?[0-9a-f]*|ttyS0)$ DevTty
/dev/(u?random|initctl|shm|log)$ VarFile
/dev$ RamdiskData
EOF
fi
