#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#
-# if udev is running, and we're in /dev, relocate ourselves
-if [ -d /.dev/ ] && [ "`pwd`" = /dev ] && [ -e /proc/mounts ] \
- && grep -qE '^[^ ]+ /\.dev' /proc/mounts; then
- cd /.dev/
+# try to do the right things if udev is running
+if [ "$WRITE_ON_UDEV" ]; then
+ :
+elif [ -d /dev/.static/dev/ ] && [ "`pwd`" = /dev ] && [ -e /proc/mounts ] \
+ && grep -qE '^[^ ]+ /dev/\.static/dev' /proc/mounts; then
+ cd /dev/.static/dev/
+elif [ -d /.dev/ ] && [ "`pwd`" = /dev ] && [ -e /proc/mounts ] \
+ && grep -qE '^[^ ]+ /\.dev' /proc/mounts; then
+ cd /.dev/
+elif [ -d .udevdb/ ] && [ "`pwd`" = /dev ]; then
+ echo ".udevdb presence implies active udev. Aborting MAKEDEV invocation."
+ # use exit 0, not 1, so postinst scripts don't fail on this
+ exit 0
fi
#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#---#
major=`Major $arg 10` || continue
makedev $arg c $major 175 $video
;;
- hwrandom)
+ hwrng)
major=`Major $arg 10` || continue
makedev $arg c $major 183 $private
;;
systrace)
makedev systrace c 10 226 $private
;;
+ uinput)
+ makedev input/uinput c 10 223 $mouse
+ ;;
js)
major=`Major Joystick 13` || continue
for unit in 0 1 2 3