chiark / gitweb /
rules: put bsd nodes in /dev/bsd/ directory
[elogind.git] / etc / udev / rules.d / 50-udev-default.rules
index bff2fe5..bdce004 100644 (file)
@@ -17,18 +17,15 @@ KERNEL=="hvc*|hvsi*",               GROUP="uucp"
 KERNEL=="lirc0",               SYMLINK+="lirc"
 
 # mem
-KERNEL=="null|zero|random",    MODE="0666"
+KERNEL=="null|zero|full|random|urandom", MODE="0666"
 KERNEL=="null",                        SYMLINK+="XOR"
 KERNEL=="mem|kmem|port",       GROUP="kmem", MODE="0640"
-KERNEL=="nvram",               GROUP="kmem", MODE="0600"
 KERNEL=="ram0",                        SYMLINK+="ramdisk"
 KERNEL=="ram1",                        SYMLINK+="ram"
-KERNEL=="urandom",             MODE="0644"
-KERNEL=="full",                        MODE="0666"
 
 # input
 KERNEL=="mouse*|mice|event*",  NAME="input/%k", MODE="0640"
-KERNEL=="ts[0-9]*|uinput",             NAME="input/%k", MODE="0600"
+KERNEL=="ts[0-9]*|uinput",     NAME="input/%k", MODE="0600"
 KERNEL=="js[0-9]*",            NAME="input/%k", MODE="0644", SYMLINK+="%k"
 
 # video4linux
@@ -58,7 +55,7 @@ SUBSYSTEM=="usb", ACTION=="add", ENV{DEVTYPE}=="usb_device", NAME="bus/usb/$env{
 KERNEL=="parport[0-9]*",       GROUP="lp"
 SUBSYSTEM=="printer",          KERNEL=="lp*", GROUP="lp"
 SUBSYSTEM=="usb",              KERNEL=="lp*", NAME="usb/%k", SYMLINK+="usb%k", GROUP="lp"
-KERNEL=="lp[0-9]*",            GROUP="lp" SYMLINK+="par%n"
+KERNEL=="lp[0-9]*",            GROUP="lp", SYMLINK+="par%n"
 KERNEL=="irlpt[0-9]*",         GROUP="lp"
 
 # block, tapes, block-releated
@@ -71,7 +68,7 @@ KERNEL=="fd[0-9]",            GROUP="floppy"
 KERNEL=="fd[0-9]", ACTION=="add", ATTRS{cmos}=="?*", RUN+="create_floppy_devices -c -t $attr{cmos} -m %M -M 0640 -G floppy $root/%k"
 KERNEL=="sch[0-9]*",           GROUP="disk"
 KERNEL=="sg[0-9]*",            GROUP="disk", MODE="0640"
-KERNEL=="ht[0-9]*|nht[0-9]*",  GROUP="disk""
+KERNEL=="ht[0-9]*|nht[0-9]*",  GROUP="disk"
 KERNEL=="pg[0-9]*",            GROUP="disk"
 KERNEL=="pt[0-9]*|npt[0-9]*",  GROUP="disk"
 KERNEL=="qft[0-9]*|nqft[0-9]*|zqft[0-9]*|nzqft[0-9]*|rawqft[0-9]*|nrawqft[0-9]*", GROUP="disk"
@@ -80,6 +77,7 @@ SUBSYSTEM=="raw", KERNEL=="raw[0-9]*", NAME="raw/%k", GROUP="disk"
 KERNEL=="pktcdvd[0-9]*",       NAME="pktcdvd/%k"
 KERNEL=="pktcdvd",             NAME="pktcdvd/control"
 KERNEL=="qft0",                        SYMLINK+="ftape"
+SUBSYSTEM=="bsg"               NAME="bsg/%k"
 
 # network
 KERNEL=="tun",                 NAME="net/%k", MODE="0666", OPTIONS+="ignore_remove"
@@ -91,7 +89,8 @@ KERNEL=="microcode",          NAME="cpu/microcode", MODE="0600"
 
 # miscellaneous
 KERNEL=="fuse",                        MODE="0666"
-KERNEL=="rtc",                 MODE="0644"
+KERNEL=="rtc|rtc0",            MODE="0644"
+KERNEL=="rtc0",                        SYMLINK+="rtc"
 KERNEL=="auer[0-9]*"           NAME="usb/%k"
 KERNEL=="hw_random",           NAME="hwrng", SYMLINK+="%k"
 KERNEL=="mmtimer",             MODE="0644"
@@ -103,3 +102,6 @@ KERNEL=="sxctl",            NAME="specialix_sxctl", SYMLINK+="%k"
 KERNEL=="rioctl",              NAME="specialix_rioctl", SYMLINK+="%k"
 KERNEL=="iowarrior[0-9]*",     NAME="usb/%k"
 
+# do not delete static device nodes
+ACTION=="remove", NAME=="?*", TEST=="/lib/udev/devices/$name", OPTIONS+="ignore_remove"
+