[PATCH] move the config files to etc/udev to clean up main directory a bit.
authorgreg@kroah.com <greg@kroah.com>
Thu, 1 Jan 2004 04:35:02 +0000 (20:35 -0800)
committerGreg KH <gregkh@suse.de>
Wed, 27 Apr 2005 04:13:14 +0000 (21:13 -0700)
12 files changed:
Makefile
etc/udev/udev.conf.in [new file with mode: 0644]
etc/udev/udev.permissions [new file with mode: 0644]
etc/udev/udev.permissions.debian [new file with mode: 0644]
etc/udev/udev.rules [new file with mode: 0644]
etc/udev/udev.rules.devfs [new file with mode: 0644]
udev.conf.in [deleted file]
udev.permissions [deleted file]
udev.permissions.debian [deleted file]
udev.rules [deleted file]
udev.rules.demo [deleted file]
udev.rules.devfs [deleted file]

index 8b20612de089711b40dad01f4fe2d3f7f54f2504..b27f1b92d9234a5dee1c39d032446134a197d625 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -29,6 +29,7 @@ ROOT =                udev
 VERSION =      011_bk
 INSTALL_DIR =  /usr/local/bin
 RELEASE_NAME = $(ROOT)-$(VERSION)
+LOCAL_CFG_DIR =        etc/udev
 
 DESTDIR =
 # override this to make udev look in a different location for it's config files
@@ -206,11 +207,11 @@ udev_version.h:
        @echo \#define UDEV_PERMISSION_FILE     \"$(configdir)\udev.permissions\" >> $@
 
 # config files automatically generated
-GEN_CONFIGS =  udev.conf
+GEN_CONFIGS =  $(LOCAL_CFG_DIR)/udev.conf
 
 # Rules on how to create the generated config files
-udev.conf:
-       sed -e "s:@udevdir@:$(udevdir):" < udev.conf.in > $@
+$(LOCAL_CFG_DIR)/udev.conf:
+       sed -e "s:@udevdir@:$(udevdir):" < $(LOCAL_CFG_DIR)/udev.conf.in > $@
 
 
 $(OBJS): $(GEN_HEADERS)
@@ -278,16 +279,16 @@ endif
 install-config: $(GEN_CONFIGS)
        $(INSTALL) -d $(DESTDIR)$(configdir)
        @if [ ! -r $(DESTDIR)$(configdir)udev.conf ]; then \
-               echo $(INSTALL_DATA) udev.conf $(DESTDIR)$(configdir); \
-               $(INSTALL_DATA) udev.conf $(DESTDIR)$(configdir); \
+               echo $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.conf $(DESTDIR)$(configdir); \
+               $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.conf $(DESTDIR)$(configdir); \
        fi
        @if [ ! -r $(DESTDIR)$(configdir)udev.rules ]; then \
-               echo $(INSTALL_DATA) udev.rules $(DESTDIR)$(configdir); \
-               $(INSTALL_DATA) udev.rules $(DESTDIR)$(configdir); \
+               echo $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.rules $(DESTDIR)$(configdir); \
+               $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.rules $(DESTDIR)$(configdir); \
        fi
        @if [ ! -r $(DESTDIR)$(configdir)udev.permissions ]; then \
-               echo $(INSTALL_DATA) udev.permissions $(DESTDIR)$(configdir); \
-               $(INSTALL_DATA) udev.permissions $(DESTDIR)$(configdir); \
+               echo $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.permissions $(DESTDIR)$(configdir); \
+               $(INSTALL_DATA) $(LOCAL_CFG_DIR)/udev.permissions $(DESTDIR)$(configdir); \
        fi
 
 
diff --git a/etc/udev/udev.conf.in b/etc/udev/udev.conf.in
new file mode 100644 (file)
index 0000000..d06b0b0
--- /dev/null
@@ -0,0 +1,23 @@
+# udev.conf
+# The main config file for udev
+#
+# This file can be used to override some of udev's default values
+# for where it looks for files, and where it places device nodes.
+
+
+# udev_root - where in the filesystem to place the device nodes
+udev_root="@udevdir@/"
+
+# udev_db - The name and location of the udev database.
+udev_db="@udevdir@/.udev.tdb"
+
+# udev_rules - The name and location of the udev rules file
+udev_rules="/etc/udev/udev.rules"
+
+# udev_permissions - The name and location of the udev permission file
+udev_permissions="/etc/udev/udev.permissions"
+
+# default_mode - set the default mode for all nodes that have no 
+#                explicit match in the permissions file
+default_mode="0600"
+
diff --git a/etc/udev/udev.permissions b/etc/udev/udev.permissions
new file mode 100644 (file)
index 0000000..e87b4dd
--- /dev/null
@@ -0,0 +1,7 @@
+#name:user:group:mode
+ttyUSB0:root:uucp:0660
+ttyUSB1:root:uucp:0666
+pl2303:500:500:0666
+visor:root:uucp:0666
+dsp1:::0666
+camera*:500:500:0666
diff --git a/etc/udev/udev.permissions.debian b/etc/udev/udev.permissions.debian
new file mode 100644 (file)
index 0000000..5df3d0f
--- /dev/null
@@ -0,0 +1,111 @@
+# name:user:group:mode
+
+# CHARACTER DEVICES
+
+# tty devices
+tty:root:tty:0660
+console:root:tty:0600
+ptmx:root:tty:0666
+ttyACM*:root:dialout:0660
+ttyUSB*:root:dialout:0660
+ttyI*:root:dialout:0660
+ttyS*:root:dialout:0660
+ttySC*:root:dialout:0660
+ttyB*:root:dialout:0660
+ttyC*:root:dialout:0660
+ttyD*:root:dialout:0660
+ttyE*:root:dialout:0660
+ttyH*:root:dialout:0660
+ttyI*:root:dialout:0660
+ttyL*:root:dialout:0660
+ttyM*:root:dialout:0660
+ttyP*:root:dialout:0660
+ttyR*:root:dialout:0660
+ttyV*:root:dialout:0660
+ttyW*:root:dialout:0660
+ttyX*:root:dialout:0660
+tts/*:root:dialout:0660
+ippp*:root:dialout:0660
+isdn*:root:dialout:0660
+isdnctrl*:root:dialout:0660
+capi*:root:dialout:0660
+dcbri*:root:dialout:0660
+ircomm*:root:dialout:0660
+
+# Memory devices
+random:root:root:0666
+urandom:root:root:0444
+mem:root:kmem:0640
+kmem:root:kmem:0640
+port:root:kmem:0640             
+full:root:root:0666
+null:root:root:0666     
+zero:root:root:0666
+
+# Misc devices
+nvram:root:root:0660    
+rtc:root:root:0660
+
+admmidi*:root:audio:660
+adsp*:root:audio:660
+aload*:root:audio:660
+amidi*:root:audio:660
+amixer*:root:audio:660
+audio*:root:audio:660
+dmfm*:root:audio:660
+dsp*:root:audio:660
+audio*:root:audio:660
+mixer*:root:audio:660
+music:root:audio:660
+sequencer*:root:audio:660
+snd/*:root:audio:660
+sound/*:root:audio:660
+
+lp*:root:lp:0660
+parport*:root:lp:0660
+irlpt*:root:lp:0660
+usblp*:root:lp:0660
+usb/lp*:root:lp:0660
+
+js:root:root:644
+djs:root:root:644
+input/*:root:root:644
+
+dri/card*:root:root:666
+
+fb*:root:video:0620
+agpgart:root:video:0660
+video*:root:video:0660
+radio*:root:video:0660
+vbi*:root:video:0660
+vtx*:root:video:0660
+mol:root:root:0600
+
+
+# BLOCK DEVICES
+
+floppy*:root:floppy:660
+floppy/*:root:floppy:660
+
+ram*:root:disk:660
+raw/*:root:disk:660
+
+hd*:root:disk:660
+sd*:root:disk:660
+dasd*:root:disk:660
+ataraid*:root:disk:660
+loop*:root:disk:660
+md*:root:disk:660
+
+sr*:root:cdrom:660
+scd*:root:cdrom:660
+sr*:root:cdrom:660
+
+ht*:root:tape:0660
+nht*:root:tape:0660
+pt*:root:tape:0660
+npt*:root:tape:0660
+st*:root:tape:0660
+nst*:root:tape:0660
+
+dm-*:root:root:0640
diff --git a/etc/udev/udev.rules b/etc/udev/udev.rules
new file mode 100644 (file)
index 0000000..06d5842
--- /dev/null
@@ -0,0 +1,49 @@
+# There are a number of modifiers that are allowed to be used in the NAME or PROGRAM fields.
+# They provide the following subsitutions:
+# %n - the "kernel number" of the device.
+#      for example, 'sda3' has a "kernel number" of '3'
+# %k - the kernel name for the device.
+# %M - the kernel major number for the device
+# %m - the kernel minor number for the device
+# %b - the bus id for the device
+# %c - the return value for the CALLOUT program (note, this doesn't work within
+#      the PROGRAM field for the obvious reason.)
+# %D - use the devfs style disk name for this device.
+#      For partitions, this will result in 'part%n'
+#      If this is not a partition, it will result in 'disc'
+#
+
+# Looking for scsi bus id 42:0:0:1
+CALLOUT, BUS="scsi", PROGRAM="/bin/echo -n test-%b", ID="test-42:0:0:1", NAME="%c"
+
+# A usb camera.
+LABEL, BUS="usb", SYSFS_vendor="FUJIFILM", SYSFS_model="M100", NAME="camera%n"
+
+# USB Epson printer to be called lp_epson
+LABEL, BUS="usb", SYSFS_serial="HXOLL0012202323480", NAME="lp_epson"
+
+# USB HP printer to be called lp_hp
+LABEL, BUS="usb", SYSFS_serial="W09090207101241330", NAME="lp_hp"
+
+# sound card with PCI bus id 00:0b.0 to be the first sound card
+NUMBER, BUS="pci", ID="00:0b.0", NAME="dsp"
+
+# sound card with PCI bus id 00:07.1 to be the second sound card
+NUMBER, BUS="pci", ID="00:07.1", NAME="dsp1" 
+
+# USB mouse plugged into the third port of the first hub to be called mouse0
+TOPOLOGY, BUS="usb", PLACE="1.3", NAME="mouse0"
+
+# USB tablet plugged into the third port of the second hub to be called mouse1
+TOPOLOGY, BUS="usb", PLACE="2.3", NAME="mouse1"
+TOPOLOGY, BUS="usb", PLACE="2.4", NAME="mouse2"
+
+# ttyUSB1 should always be called visor
+REPLACE, KERNEL="ttyUSB1", NAME="visor"
+REPLACE, KERNEL="ttyUSB0", NAME="pl2303"
+
+# a devfs like way to name some tty devices
+#REPLACE, KERNEL="ttyS*", NAME="tts/%n"
+#REPLACE, KERNEL="tty*", NAME="vc/%n"
+
+
diff --git a/etc/udev/udev.rules.devfs b/etc/udev/udev.rules.devfs
new file mode 100644 (file)
index 0000000..0d579a4
--- /dev/null
@@ -0,0 +1,43 @@
+# These rules are to try to emulate a devfs naming scheme in udev
+# if there are any missing rules, please let the udev developers
+# know.
+#
+# There are a number of modifiers that are allowed to be used in the
+# a number of the different fields. They provide the following subsitutions:
+# %n - the "kernel number" of the device.
+#      for example, 'sda3' has a "kernel number" of '3'
+# %M - the kernel major number for the device
+# %m - the kernel minor number for the device
+# %b - the bus id for the device
+# %c - the return value for the CALLOUT program (note, this doesn't work within
+#      the PROGRAM field for the obvious reason.)
+# %D - use the devfs style disk name for this device.
+#      For partitions, this will result in 'part%n'
+#      If this is not a partition, it will result in 'disc'
+#
+
+# ide block devices
+NUMBER, BUS="ide", id="0.0", NAME="ide/host0/bus0/target0/lun0/%D"
+NUMBER, BUS="ide", id="0.1", NAME="ide/host0/bus0/target1/lun0/%D"
+NUMBER, BUS="ide", id="1.0", NAME="ide/host0/bus1/target0/lun0/%D"
+NUMBER, BUS="ide", id="1.1", NAME="ide/host0/bus1/target1/lun0/%D"
+
+# md block devices
+REPLACE, KERNEL="md[0-9]*", NAME="md/%n"
+
+# tty devices
+REPLACE, KERNEL="tty[0-9]*", NAME="vc/%n"
+REPLACE, KERNEL="ttyS[0-9]*", NAME="tts/%n"
+REPLACE, KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n"
+
+# vc devices
+REPLACE, KERNEL="vcs",        NAME="vcc/0"
+REPLACE, KERNEL="vcs[0-9]*",  NAME="vcc/%n"
+REPLACE, KERNEL="vcsa",       NAME="vcc/a0"
+REPLACE, KERNEL="vcsa[0-9]*", NAME="vcc/a%n"
+
+# v4l devices
+REPLACE, KERNEL="video[0-9]*", NAME="v4l/video%n"
+REPLACE, KERNEL="radio[0-9]*", NAME="v4l/radio%n"
+REPLACE, KERNEL="vbi[0-9]*",   NAME="v4l/vbi%n"
+REPLACE, KERNEL="vtx[0-9]*",   NAME="v4l/vtx%n"
diff --git a/udev.conf.in b/udev.conf.in
deleted file mode 100644 (file)
index d06b0b0..0000000
+++ /dev/null
@@ -1,23 +0,0 @@
-# udev.conf
-# The main config file for udev
-#
-# This file can be used to override some of udev's default values
-# for where it looks for files, and where it places device nodes.
-
-
-# udev_root - where in the filesystem to place the device nodes
-udev_root="@udevdir@/"
-
-# udev_db - The name and location of the udev database.
-udev_db="@udevdir@/.udev.tdb"
-
-# udev_rules - The name and location of the udev rules file
-udev_rules="/etc/udev/udev.rules"
-
-# udev_permissions - The name and location of the udev permission file
-udev_permissions="/etc/udev/udev.permissions"
-
-# default_mode - set the default mode for all nodes that have no 
-#                explicit match in the permissions file
-default_mode="0600"
-
diff --git a/udev.permissions b/udev.permissions
deleted file mode 100644 (file)
index e87b4dd..0000000
+++ /dev/null
@@ -1,7 +0,0 @@
-#name:user:group:mode
-ttyUSB0:root:uucp:0660
-ttyUSB1:root:uucp:0666
-pl2303:500:500:0666
-visor:root:uucp:0666
-dsp1:::0666
-camera*:500:500:0666
diff --git a/udev.permissions.debian b/udev.permissions.debian
deleted file mode 100644 (file)
index 5df3d0f..0000000
+++ /dev/null
@@ -1,111 +0,0 @@
-# name:user:group:mode
-
-# CHARACTER DEVICES
-
-# tty devices
-tty:root:tty:0660
-console:root:tty:0600
-ptmx:root:tty:0666
-ttyACM*:root:dialout:0660
-ttyUSB*:root:dialout:0660
-ttyI*:root:dialout:0660
-ttyS*:root:dialout:0660
-ttySC*:root:dialout:0660
-ttyB*:root:dialout:0660
-ttyC*:root:dialout:0660
-ttyD*:root:dialout:0660
-ttyE*:root:dialout:0660
-ttyH*:root:dialout:0660
-ttyI*:root:dialout:0660
-ttyL*:root:dialout:0660
-ttyM*:root:dialout:0660
-ttyP*:root:dialout:0660
-ttyR*:root:dialout:0660
-ttyV*:root:dialout:0660
-ttyW*:root:dialout:0660
-ttyX*:root:dialout:0660
-tts/*:root:dialout:0660
-ippp*:root:dialout:0660
-isdn*:root:dialout:0660
-isdnctrl*:root:dialout:0660
-capi*:root:dialout:0660
-dcbri*:root:dialout:0660
-ircomm*:root:dialout:0660
-
-# Memory devices
-random:root:root:0666
-urandom:root:root:0444
-mem:root:kmem:0640
-kmem:root:kmem:0640
-port:root:kmem:0640             
-full:root:root:0666
-null:root:root:0666     
-zero:root:root:0666
-
-# Misc devices
-nvram:root:root:0660    
-rtc:root:root:0660
-
-admmidi*:root:audio:660
-adsp*:root:audio:660
-aload*:root:audio:660
-amidi*:root:audio:660
-amixer*:root:audio:660
-audio*:root:audio:660
-dmfm*:root:audio:660
-dsp*:root:audio:660
-audio*:root:audio:660
-mixer*:root:audio:660
-music:root:audio:660
-sequencer*:root:audio:660
-snd/*:root:audio:660
-sound/*:root:audio:660
-
-lp*:root:lp:0660
-parport*:root:lp:0660
-irlpt*:root:lp:0660
-usblp*:root:lp:0660
-usb/lp*:root:lp:0660
-
-js:root:root:644
-djs:root:root:644
-input/*:root:root:644
-
-dri/card*:root:root:666
-
-fb*:root:video:0620
-agpgart:root:video:0660
-video*:root:video:0660
-radio*:root:video:0660
-vbi*:root:video:0660
-vtx*:root:video:0660
-mol:root:root:0600
-
-
-# BLOCK DEVICES
-
-floppy*:root:floppy:660
-floppy/*:root:floppy:660
-
-ram*:root:disk:660
-raw/*:root:disk:660
-
-hd*:root:disk:660
-sd*:root:disk:660
-dasd*:root:disk:660
-ataraid*:root:disk:660
-loop*:root:disk:660
-md*:root:disk:660
-
-sr*:root:cdrom:660
-scd*:root:cdrom:660
-sr*:root:cdrom:660
-
-ht*:root:tape:0660
-nht*:root:tape:0660
-pt*:root:tape:0660
-npt*:root:tape:0660
-st*:root:tape:0660
-nst*:root:tape:0660
-
-dm-*:root:root:0640
diff --git a/udev.rules b/udev.rules
deleted file mode 100644 (file)
index 06d5842..0000000
+++ /dev/null
@@ -1,49 +0,0 @@
-# There are a number of modifiers that are allowed to be used in the NAME or PROGRAM fields.
-# They provide the following subsitutions:
-# %n - the "kernel number" of the device.
-#      for example, 'sda3' has a "kernel number" of '3'
-# %k - the kernel name for the device.
-# %M - the kernel major number for the device
-# %m - the kernel minor number for the device
-# %b - the bus id for the device
-# %c - the return value for the CALLOUT program (note, this doesn't work within
-#      the PROGRAM field for the obvious reason.)
-# %D - use the devfs style disk name for this device.
-#      For partitions, this will result in 'part%n'
-#      If this is not a partition, it will result in 'disc'
-#
-
-# Looking for scsi bus id 42:0:0:1
-CALLOUT, BUS="scsi", PROGRAM="/bin/echo -n test-%b", ID="test-42:0:0:1", NAME="%c"
-
-# A usb camera.
-LABEL, BUS="usb", SYSFS_vendor="FUJIFILM", SYSFS_model="M100", NAME="camera%n"
-
-# USB Epson printer to be called lp_epson
-LABEL, BUS="usb", SYSFS_serial="HXOLL0012202323480", NAME="lp_epson"
-
-# USB HP printer to be called lp_hp
-LABEL, BUS="usb", SYSFS_serial="W09090207101241330", NAME="lp_hp"
-
-# sound card with PCI bus id 00:0b.0 to be the first sound card
-NUMBER, BUS="pci", ID="00:0b.0", NAME="dsp"
-
-# sound card with PCI bus id 00:07.1 to be the second sound card
-NUMBER, BUS="pci", ID="00:07.1", NAME="dsp1" 
-
-# USB mouse plugged into the third port of the first hub to be called mouse0
-TOPOLOGY, BUS="usb", PLACE="1.3", NAME="mouse0"
-
-# USB tablet plugged into the third port of the second hub to be called mouse1
-TOPOLOGY, BUS="usb", PLACE="2.3", NAME="mouse1"
-TOPOLOGY, BUS="usb", PLACE="2.4", NAME="mouse2"
-
-# ttyUSB1 should always be called visor
-REPLACE, KERNEL="ttyUSB1", NAME="visor"
-REPLACE, KERNEL="ttyUSB0", NAME="pl2303"
-
-# a devfs like way to name some tty devices
-#REPLACE, KERNEL="ttyS*", NAME="tts/%n"
-#REPLACE, KERNEL="tty*", NAME="vc/%n"
-
-
diff --git a/udev.rules.demo b/udev.rules.demo
deleted file mode 100644 (file)
index 9ea7895..0000000
+++ /dev/null
@@ -1,9 +0,0 @@
-# USB camera from Fuji to be named "camera"
-LABEL, BUS="usb", SYSFS_vendor="FUJIFILM", NAME="camera%n"
-
-# USB device plugged into the fourth port of the second hub to be called gps_device
-TOPOLOGY, BUS="usb", PLACE="2.4", NAME="gps_device"
-
-# ttyUSB1 should always be called visor
-REPLACE, KERNEL="ttyUSB1", NAME="visor"
-
diff --git a/udev.rules.devfs b/udev.rules.devfs
deleted file mode 100644 (file)
index 0d579a4..0000000
+++ /dev/null
@@ -1,43 +0,0 @@
-# These rules are to try to emulate a devfs naming scheme in udev
-# if there are any missing rules, please let the udev developers
-# know.
-#
-# There are a number of modifiers that are allowed to be used in the
-# a number of the different fields. They provide the following subsitutions:
-# %n - the "kernel number" of the device.
-#      for example, 'sda3' has a "kernel number" of '3'
-# %M - the kernel major number for the device
-# %m - the kernel minor number for the device
-# %b - the bus id for the device
-# %c - the return value for the CALLOUT program (note, this doesn't work within
-#      the PROGRAM field for the obvious reason.)
-# %D - use the devfs style disk name for this device.
-#      For partitions, this will result in 'part%n'
-#      If this is not a partition, it will result in 'disc'
-#
-
-# ide block devices
-NUMBER, BUS="ide", id="0.0", NAME="ide/host0/bus0/target0/lun0/%D"
-NUMBER, BUS="ide", id="0.1", NAME="ide/host0/bus0/target1/lun0/%D"
-NUMBER, BUS="ide", id="1.0", NAME="ide/host0/bus1/target0/lun0/%D"
-NUMBER, BUS="ide", id="1.1", NAME="ide/host0/bus1/target1/lun0/%D"
-
-# md block devices
-REPLACE, KERNEL="md[0-9]*", NAME="md/%n"
-
-# tty devices
-REPLACE, KERNEL="tty[0-9]*", NAME="vc/%n"
-REPLACE, KERNEL="ttyS[0-9]*", NAME="tts/%n"
-REPLACE, KERNEL="ttyUSB[0-9]*", NAME="tts/USB%n"
-
-# vc devices
-REPLACE, KERNEL="vcs",        NAME="vcc/0"
-REPLACE, KERNEL="vcs[0-9]*",  NAME="vcc/%n"
-REPLACE, KERNEL="vcsa",       NAME="vcc/a0"
-REPLACE, KERNEL="vcsa[0-9]*", NAME="vcc/a%n"
-
-# v4l devices
-REPLACE, KERNEL="video[0-9]*", NAME="v4l/video%n"
-REPLACE, KERNEL="radio[0-9]*", NAME="v4l/radio%n"
-REPLACE, KERNEL="vbi[0-9]*",   NAME="v4l/vbi%n"
-REPLACE, KERNEL="vtx[0-9]*",   NAME="v4l/vtx%n"