--- udev.install.orig 2009-02-11 02:16:03.000000000 -0200 +++ udev.install 2009-02-11 02:46:30.000000000 -0200 @@ -25,8 +25,30 @@ umount ${ROOTDIR} rmdir ${ROOTDIR} fi + + [ -c /lib/udev/devices/console ] || mknod -m 0600 /lib/udev/devices/console c 5 1 + [ -c /lib/udev/devices/null ] || mknod -m 0666 /lib/udev/devices/null c 1 3 + [ -c /lib/udev/devices/zero ] || mknod -m 0666 /lib/udev/devices/zero c 1 5 + + [ -L /lib/udev/devices/fd ] || ln -snf /proc/self/fd /lib/udev/devices/fd + + [ -L /lib/udev/devices/fd/stdin ] || ln -snf /proc/self/fd/0 /lib/udev/devices/stdin + [ -L /lib/udev/devices/fd/stdout ] || ln -snf /proc/self/fd/1 /lib/udev/devices/stdout + [ -L /lib/udev/devices/fd/stderr ] || ln -snf /proc/self/fd/2 /lib/udev/devices/stderr + + [ -L /lib/udev/devices/core ] || ln -snf /proc/kcore /lib/udev/devices/core + + [ -d /lib/udev/devices/pts ] || mkdir /lib/udev/devices/pts + [ -d /lib/udev/devices/shm ] || mkdir /lib/udev/devices/shm + } +post_remove() { + + rm /lib/udev/devices/{console,null,zero,fd,stdin,stdout,stderr,core} &> /dev/null + rmdir /lib/udev/devices/{pts,shm} &> /dev/null + +} op=$1 shift $op $*