chiark / gitweb /
use libexecdir, bindir, sbindir, switch to /usr/lib/udev in documentation
authorKay Sievers <kay.sievers@vrfy.org>
Thu, 1 Dec 2011 11:17:22 +0000 (12:17 +0100)
committerKay Sievers <kay.sievers@vrfy.org>
Mon, 5 Dec 2011 16:23:56 +0000 (17:23 +0100)
28 files changed:
INSTALL
Makefile.am
NEWS
README
TODO
autogen.sh
configure.ac
extras/keymap/.gitignore
extras/keymap/95-keyboard-force-release.rules
extras/keymap/95-keymap.rules
extras/keymap/README.keymap.txt
extras/keymap/keyboard-force-release.sh.in [moved from extras/keymap/keyboard-force-release.sh with 89% similarity]
extras/mtd_probe/.gitignore
extras/mtd_probe/75-probe_mtd.rules.in [moved from extras/mtd_probe/75-probe_mtd.rules with 67% similarity]
extras/rule_generator/rule_generator.functions
extras/scsi_id/.gitignore
extras/scsi_id/scsi_id.8
rules/.gitignore [new file with mode: 0644]
rules/rules.d/60-persistent-storage.rules.in [moved from rules/rules.d/60-persistent-storage.rules with 95% similarity]
rules/rules.d/80-drivers.rules [deleted file]
rules/rules.d/80-drivers.rules.in [new file with mode: 0644]
systemd/udev-settle.service.in
systemd/udev-trigger.service.in
test/udev-test.pl
udev/udev-event.c
udev/udev-rules.c
udev/udev.xml
udev/udevd.xml

diff --git a/INSTALL b/INSTALL
index 943a8a467a32790118d46042c1b28b260b96074e..8ad69a43ad48951262dbd273548a19b5b759efe4 100644 (file)
--- a/INSTALL
+++ b/INSTALL
@@ -1,30 +1,43 @@
-Usual options for udev installed in the root filesystem are:
-  ./configure \
+The options used used usually look like:
+  %configure \
     --prefix=/usr \
     --sysconfdir=/etc \
     --prefix=/usr \
     --sysconfdir=/etc \
-    --sbindir=/sbin \
+    --bindir=/usr/bin \
+    --sbindir=/usr/sbin \
     --libdir=/usr/lib64 \
     --libdir=/usr/lib64 \
-    --with-rootlibdir=/lib64 \
-    --libexecdir=/lib/udev \
+    --libexecdir=/usr/lib/udev \
+    --with-systemdsystemunitdir=/usr/lib/systemd/system \
     --with-selinux
 
     --with-selinux
 
-The options used in a RPM spec file usually look like:
+The options used in a RPM spec file look like:
   %configure \
     --prefix=%{_prefix} \
     --sysconfdir=%{_sysconfdir} \
   %configure \
     --prefix=%{_prefix} \
     --sysconfdir=%{_sysconfdir} \
-    --sbindir=/sbin \
+    --bindir=%{_bindir} \
+    --sbindir=%{_sbindir} \
     --libdir=%{_libdir} \
     --libdir=%{_libdir} \
-    --with-rootlibdir=/%{_lib} \
-    --libexecdir=/lib/udev \
+    --libexecdir=%{_prefix}/lib/udev \
+    --with-systemdsystemunitdir=%{_prefix}/lib/systemd/system \
     --with-selinux
 
     --with-selinux
 
+The options to install udev in the rootfs instead of /usr,
+and udevadm in /sbin:
+    --bindir=/sbin
+    --sbindir=/sbin
+    --libexecdir=/lib/udev
+    --with-systemdsystemunitdir=/lib/systemd/system
+    --with-rootlibdir=/lib64
+
+Some tools expect udevadm in 'sbin'. A symlink to udevadm in 'bin'
+needs to be manually created if needed.
+
 The defined location for scripts and binaries which are called
 The defined location for scripts and binaries which are called
-from rules is /lib/udev/ on all systems and architectures. Any
+from rules is /usr/lib/udev/ on all systems and architectures. Any
 other location will break other packages, who rightfully expect
 other location will break other packages, who rightfully expect
-the /lib/udev/ directory, to install their rule helper and udev
+the /usr/lib/udev/ directory, to install their rule helper and udev
 rule files.
 
 rule files.
 
-It is possible to use the /lib/udev/devices/ directory to place
+It is possible to use the /usr/lib/udev/devices/ directory to place
 device nodes, directories and symlinks, which are copied to /dev/
 at every bootup. That way, nodes for devices which can not be
 detected automatically, or are activated on-demand by opening the
 device nodes, directories and symlinks, which are copied to /dev/
 at every bootup. That way, nodes for devices which can not be
 detected automatically, or are activated on-demand by opening the
index 6a900b0a2b056a6081e759be0659b269901cd5cc..acad5eca185ef9b83cfb18daea46dce7bafd4d67 100644 (file)
@@ -114,14 +114,16 @@ EXTRA_DIST += \
 udevrulesdir = $(libexecdir)/rules.d
 dist_udevrules_DATA = \
        rules/rules.d/50-udev-default.rules \
 udevrulesdir = $(libexecdir)/rules.d
 dist_udevrules_DATA = \
        rules/rules.d/50-udev-default.rules \
-       rules/rules.d/60-persistent-storage.rules \
        rules/rules.d/60-persistent-storage-tape.rules \
        rules/rules.d/60-persistent-serial.rules \
        rules/rules.d/60-persistent-input.rules \
        rules/rules.d/60-persistent-alsa.rules \
        rules/rules.d/60-persistent-storage-tape.rules \
        rules/rules.d/60-persistent-serial.rules \
        rules/rules.d/60-persistent-input.rules \
        rules/rules.d/60-persistent-alsa.rules \
-       rules/rules.d/80-drivers.rules \
        rules/rules.d/95-udev-late.rules
 
        rules/rules.d/95-udev-late.rules
 
+udevrules_DATA = \
+       rules/rules.d/60-persistent-storage.rules \
+       rules/rules.d/80-drivers.rules
+
 udevconfdir = $(sysconfdir)/udev
 dist_udevconf_DATA = udev.conf
 
 udevconfdir = $(sysconfdir)/udev
 dist_udevconf_DATA = udev.conf
 
@@ -151,7 +153,7 @@ systemd-install-hook:
 INSTALL_DATA_HOOKS += systemd-install-hook
 endif
 
 INSTALL_DATA_HOOKS += systemd-install-hook
 endif
 
-sbin_PROGRAMS = \
+bin_PROGRAMS = \
        udev/udevadm
 
 libexec_PROGRAMS = \
        udev/udevadm
 
 libexec_PROGRAMS = \
diff --git a/NEWS b/NEWS
index 344f21df72f31f06b09f2f9418840fef0ffe797e..99d94e29ea0ed65c6173b7882fb99c71444c2d46 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -1,5 +1,9 @@
 udev 176
 ========
 udev 176
 ========
+The udevadm tool moved from 'sbin' to 'bin'. Some tools expect
+udevadm in 'sbin'. A symlink to udevadm in 'bin' needs to be
+manually created if needed.
+
 The systemd socket files use PassCred=yes, which requires systemd
 version 38.
 
 The systemd socket files use PassCred=yes, which requires systemd
 version 38.
 
diff --git a/README b/README
index 5a8d4cc0b3ea9ea8808bec0dd9327efe43a55eb3..0d25b84fad9f2c604ad83271c51572e49b6c7eb2 100644 (file)
--- a/README
+++ b/README
@@ -10,10 +10,10 @@ The upstream udev project's set of default rules may require a most recent
 kernel release to work properly. This is currently version 2.6.32.
 
 Tools and rules shipped by udev are not public API and may change at any time.
 kernel release to work properly. This is currently version 2.6.32.
 
 Tools and rules shipped by udev are not public API and may change at any time.
-Never call any private tool in /lib/udev from any external application; it might
-just go away in the next release. Access to udev information is only offered
-by udevadm and libudev. Tools and rules in /lib/udev and the entire contents of
-the /run/udev directory are private to udev and do change whenever needed.
+Never call any private tool in /usr/lib/udev from any external application; it
+might just go away in the next release. Access to udev information is only offered
+by udevadm and libudev. Tools and rules in /usr/lib/udev and the entire contents
+of the /run/udev directory are private to udev and do change whenever needed.
 
 Requirements:
   - Version 2.6.34 of the Linux kernel with sysfs, procfs, signalfd, inotify,
 
 Requirements:
   - Version 2.6.34 of the Linux kernel with sysfs, procfs, signalfd, inotify,
@@ -72,8 +72,8 @@ Setup:
   - The udev daemon should be started to handle device events sent by the kernel.
     During bootup, the events for already existing devices can be replayed, so
     that they are configured by udev. This is usually done by:
   - The udev daemon should be started to handle device events sent by the kernel.
     During bootup, the events for already existing devices can be replayed, so
     that they are configured by udev. This is usually done by:
-      /sbin/udevadm trigger --action=add --type=subsystems
-      /sbin/udevadm trigger --action=add --type=devices
+      udevadm trigger --action=add --type=subsystems
+      udevadm trigger --action=add --type=devices
 
   - Restarting the daemon never applies any rules to existing devices.
 
 
   - Restarting the daemon never applies any rules to existing devices.
 
diff --git a/TODO b/TODO
index 1fd8eb261867dcf37f5d4c7cd85dc2ac19b2eeef..661709aad845b7b5b1e23128a7e1334e21123ea5 100644 (file)
--- a/TODO
+++ b/TODO
@@ -1,3 +1,7 @@
+ - move cc opts from autogen to configure.ac
+
+ - move /lib/udev/devices/ to tmpfiles
+
  - trigger --subsystem-match=usb/usb_device
 
  - test (now fixed) /dev/tape/ links
  - trigger --subsystem-match=usb/usb_device
 
  - test (now fixed) /dev/tape/ links
index b6ffee7297fc1e853a3bd3dc0c7ed9d463960170..ba956694266dbd5f4ce2c65e24a2bcfac74dab20 100755 (executable)
@@ -24,10 +24,11 @@ libdir() {
 
 args="--prefix=/usr \
 --sysconfdir=/etc \
 
 args="--prefix=/usr \
 --sysconfdir=/etc \
---sbindir=/sbin \
+--bindir=/usr/bin \
+--sbindir=/usr/sbin \
 --libdir=$(libdir /usr/lib) \
 --libdir=$(libdir /usr/lib) \
---with-rootlibdir=$(libdir /lib) \
---libexecdir=/lib/udev \
+--libexecdir=/usr/lib/udev \
+--with-systemdsystemunitdir=/usr/lib/systemd/system
 --with-selinux \
 --enable-gtk-doc"
 
 --with-selinux \
 --enable-gtk-doc"
 
index 2d90b5448fef94e0eb5b8621f32286db56f974dc..df8d76d28cb5506ffc86e8b3b40da0f62bff544e 100644 (file)
@@ -200,6 +200,9 @@ AM_CONDITIONAL([ENABLE_EDD], [test "x$enable_edd" = "xyes"])
 AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_FILES([
        Makefile
 AC_CONFIG_HEADERS(config.h)
 AC_CONFIG_FILES([
        Makefile
+       extras/mtd_probe/75-probe_mtd.rules
+       rules/rules.d/80-drivers.rules
+       rules/rules.d/60-persistent-storage.rules
        udev/udev.pc
        systemd/udev.service
        systemd/udev-trigger.service
        udev/udev.pc
        systemd/udev.service
        systemd/udev-trigger.service
@@ -210,6 +213,7 @@ AC_CONFIG_FILES([
        extras/gudev/gudev-1.0.pc
        extras/gudev/docs/Makefile
        extras/gudev/docs/version.xml
        extras/gudev/gudev-1.0.pc
        extras/gudev/docs/Makefile
        extras/gudev/docs/version.xml
+       extras/keymap/keyboard-force-release.sh
 ])
 
 AC_OUTPUT
 ])
 
 AC_OUTPUT
@@ -219,7 +223,8 @@ AC_MSG_RESULT([
 
        prefix:                 ${prefix}
        sysconfdir:             ${sysconfdir}
 
        prefix:                 ${prefix}
        sysconfdir:             ${sysconfdir}
-       sbindir:                ${sbindir}
+       bindir:                 ${bindir}
+       sbindir:                ${bindir}
        libdir:                 ${libdir}
        rootlibdir:             ${rootlib_execdir}
        libexecdir:             ${libexecdir}
        libdir:                 ${libdir}
        rootlibdir:             ${rootlib_execdir}
        libexecdir:             ${libexecdir}
index f2c4c8dca6168f4663723df3f10f8512b504d039..01d62e2b6e67f56ef96b418854990c5e0d44054b 100644 (file)
@@ -1,6 +1,6 @@
+keyboard-force-release.sh
 keymap
 keys-from-name.gperf
 keys-from-name.h
 keys-to-name.h
 keys.txt
 keymap
 keys-from-name.gperf
 keys-from-name.h
 keys-to-name.h
 keys.txt
-
index 63cf67fb59513265a50aa18867778c480806ef27..79a1bc1cc41f66666a269e2b67383c1b17ed29e6 100644 (file)
@@ -5,10 +5,10 @@
 # The atkbd driver has a quirk handler for generating synthetic
 # release events, which can be configured via sysfs since 2.6.32.
 # Simply add a file with a list of scancodes for your laptop model
 # The atkbd driver has a quirk handler for generating synthetic
 # release events, which can be configured via sysfs since 2.6.32.
 # Simply add a file with a list of scancodes for your laptop model
-# in /lib/udev/keymaps, and add a rule here.
+# in /usr/lib/udev/keymaps, and add a rule here.
 # If the hotkeys also need a keymap assignment you can copy the
 # scancodes from the keymap file, otherwise you can run
 # If the hotkeys also need a keymap assignment you can copy the
 # scancodes from the keymap file, otherwise you can run
-# /lib/udev/keymap -i /dev/input/eventX
+# /usr/lib/udev/keymap -i /dev/input/eventX
 # on a Linux vt to find out.
 
 ACTION=="remove", GOTO="force_release_end"
 # on a Linux vt to find out.
 
 ACTION=="remove", GOTO="force_release_end"
index 248c58f09cfc105bcfa72ddf8b82d9b704e9b147..1ec18b7f553c7fb1b4b5248c9b14c8fa10236bec 100644 (file)
@@ -2,7 +2,7 @@
 #
 # Key map overrides can be specified by either giving scancode/keyname pairs
 # directly as keymap arguments (if there are just one or two to change), or as
 #
 # Key map overrides can be specified by either giving scancode/keyname pairs
 # directly as keymap arguments (if there are just one or two to change), or as
-# a file name (in /lib/udev/keymaps), which has to contain scancode/keyname
+# a file name (in /usr/lib/udev/keymaps), which has to contain scancode/keyname
 # pairs.
 
 ACTION=="remove", GOTO="keyboard_end"
 # pairs.
 
 ACTION=="remove", GOTO="keyboard_end"
index 79d9971b1d64b666d12964ebf466d53218354b4c..acdc00283a0e0aa866140f2706323f3faa3a2b46 100644 (file)
@@ -44,7 +44,7 @@ for inclusion you need to do the following steps:
 
  1. Find the keyboard device.
 
 
  1. Find the keyboard device.
 
- Run /lib/udev/findkeyboards. This should always give you an "AT
+ Run /usr/lib/udev/findkeyboards. This should always give you an "AT
  keyboard" and possibly a "module". Some laptops (notably Thinkpads, Sonys, and
  Acers) have multimedia/function keys on a separate input device instead of the
  primary keyboard. The keyboard device should have a name like "input/event3".
  keyboard" and possibly a "module". Some laptops (notably Thinkpads, Sonys, and
  Acers) have multimedia/function keys on a separate input device instead of the
  primary keyboard. The keyboard device should have a name like "input/event3".
@@ -53,7 +53,7 @@ for inclusion you need to do the following steps:
 
  2. Find broken scan codes:
 
 
  2. Find broken scan codes:
 
- sudo /lib/udev/keymap -i input/eventX
+ sudo /usr/lib/udev/keymap -i input/eventX
 
  Press all multimedia/function keys and check if the key name that gets printed
  out is plausible. If it is unknown or wrong, write down the scan code (looks
 
  Press all multimedia/function keys and check if the key name that gets printed
  out is plausible. If it is unknown or wrong, write down the scan code (looks
@@ -67,14 +67,14 @@ for inclusion you need to do the following steps:
    0x1E www # Fn+F2 web browser
 
  Repeat that for all other keys. Write the resulting list into a file. Look at
    0x1E www # Fn+F2 web browser
 
  Repeat that for all other keys. Write the resulting list into a file. Look at
- /lib/udev/keymaps/ for existing key map files and make sure that you use the
+ /usr/lib/udev/keymaps/ for existing key map files and make sure that you use the
  same structure.
 
  If the key only ever works once and then your keyboard (or the entire desktop)
  gets stuck for a long time, then it is likely that the BIOS fails to send a
  corresponding "key release" event after the key press event. Please note down
  this case as well, as it can be worked around in
  same structure.
 
  If the key only ever works once and then your keyboard (or the entire desktop)
  gets stuck for a long time, then it is likely that the BIOS fails to send a
  corresponding "key release" event after the key press event. Please note down
  this case as well, as it can be worked around in
- /lib/udev/keymaps/95-keyboard-force-release.rules .
+ /usr/lib/udev/keymaps/95-keyboard-force-release.rules .
 
  3. Find out your system vendor and product:
 
 
  3. Find out your system vendor and product:
 
@@ -87,8 +87,8 @@ for inclusion you need to do the following steps:
  and /tmp/udev-db.txt from step 4 to the linux-hotplug@vger.kernel.org mailing
  list, so that they can be included in the next release.
 
  and /tmp/udev-db.txt from step 4 to the linux-hotplug@vger.kernel.org mailing
  list, so that they can be included in the next release.
 
-For local testing, copy your map file to /lib/udev/keymaps/ with an appropriate
-name, and add an appropriate udev rule to /lib/udev/rules.d/95-keymap.rules:
+For local testing, copy your map file to /usr/lib/udev/keymaps/ with an appropriate
+name, and add an appropriate udev rule to /usr/lib/udev/rules.d/95-keymap.rules:
 
   * If you selected an "AT keyboard", add the rule to the section after
   'LABEL="keyboard_vendorcheck"'.
 
   * If you selected an "AT keyboard", add the rule to the section after
   'LABEL="keyboard_vendorcheck"'.
similarity index 89%
rename from extras/keymap/keyboard-force-release.sh
rename to extras/keymap/keyboard-force-release.sh.in
index b157ac310d11976bbfc915d7287016f23f6cc07a..05dd5da2e073227fafffc98015ce3bb783145bde 100644 (file)
@@ -6,7 +6,7 @@
 
 case "$2" in
        /*) scf="$2" ;;
 
 case "$2" in
        /*) scf="$2" ;;
-       *)  scf="/lib/udev/keymaps/force-release/$2" ;;
+       *)  scf="@libexecdir@/keymaps/force-release/$2" ;;
 esac
 
 read attr <"/sys/$1/force_release"
 esac
 
 read attr <"/sys/$1/force_release"
index 82b8ab501f8ec030fed642d8d2ebfb6c716b6748..70d3e8310e4483565bf37ce691aee2e5b8f9610d 100644 (file)
@@ -1 +1,2 @@
 mtd_probe
 mtd_probe
+75-probe_mtd.rules
similarity index 67%
rename from extras/mtd_probe/75-probe_mtd.rules
rename to extras/mtd_probe/75-probe_mtd.rules.in
index 184fda58a921fb2585424f60f64780d981e9b0b8..2e28d37fa3f523bea50c1378348de4f159c4a21c 100644 (file)
@@ -3,6 +3,6 @@
 ACTION!="add", GOTO="mtd_probe_end"
 
 KERNEL=="mtd*ro", IMPORT{program}="mtd_probe $tempnode"
 ACTION!="add", GOTO="mtd_probe_end"
 
 KERNEL=="mtd*ro", IMPORT{program}="mtd_probe $tempnode"
-KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN+="/sbin/modprobe -bv sm_ftl"
+KERNEL=="mtd*ro", ENV{MTD_FTL}=="smartmedia", RUN+="@sbindir@/modprobe -bv sm_ftl"
 
 LABEL="mtd_probe_end"
 
 LABEL="mtd_probe_end"
index 4bec27a1b782d3f15684ea9772b4359eb6313bca..0f1b73850e886613cc165c84a1d06497d6287ee3 100644 (file)
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
-PATH='/sbin:/bin'
-#
-
-PATH='/sbin:/bin'
+PATH='/usr/bin:/bin:/usr/sbin:/sbin'
 
 # Read a single line from file $1 in the $DEVPATH directory.
 # The function must not return an error even if the file does not exist.
 
 # Read a single line from file $1 in the $DEVPATH directory.
 # The function must not return an error even if the file does not exist.
index 8372f68193b13d7952fcee5ede2b69dc6ee59237..10e9ae743c81727b45dab8ad88238733f8141dec 100644 (file)
@@ -1,2 +1,3 @@
 scsi_id
 scsi_id
+scsi_id.8
 scsi_id_version.h
 scsi_id_version.h
index 0221b9883114facda0ed8b6cff4639ac5833d040..8f83f390209e22bab8fd347d67bf879d984ecae0 100644 (file)
@@ -33,7 +33,7 @@ by page 0x80. For example:
 
 .sp
 .nf
 
 .sp
 .nf
-# /lib/udev/scsi_id \-\-page=0x80 \-\-whitelisted \-\-device=/dev/sda
+# /usr/lib/udev/scsi_id \-\-page=0x80 \-\-whitelisted \-\-device=/dev/sda
 SIBM     3542           1T05078453
 .fi
 .P
 SIBM     3542           1T05078453
 .fi
 .P
@@ -45,7 +45,7 @@ identifier starts with the NAA value of 6):
 
 .sp
 .nf
 
 .sp
 .nf
-# /lib/udev/scsi_id \-\-page=0x83 \-\-whitelisted \-\-device=/dev/sda
+# /usr/lib/udev/scsi_id \-\-page=0x83 \-\-whitelisted \-\-device=/dev/sda
 3600a0b80000b174b000000d63efc5c8c
 .fi
 .P
 3600a0b80000b174b000000d63efc5c8c
 .fi
 .P
diff --git a/rules/.gitignore b/rules/.gitignore
new file mode 100644 (file)
index 0000000..7240bd7
--- /dev/null
@@ -0,0 +1,2 @@
+rules.d/60-persistent-storage.rules
+rules.d/80-drivers.rules
similarity index 95%
rename from rules/rules.d/60-persistent-storage.rules
rename to rules/rules.d/60-persistent-storage.rules.in
index 894b50ba8e18d4efa7a30691ff5f16405272eec1..47185386cdf0487046851a6e4f91e6c99169bd85 100644 (file)
@@ -66,12 +66,12 @@ ENV{DEVTYPE}=="partition", ENV{ID_PATH}=="?*", SYMLINK+="disk/by-path/$env{ID_PA
 ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end"
 
 # probe filesystem metadata of optical drives which have a media inserted
 ENV{DEVTYPE}=="disk", KERNEL!="sd*|sr*", ATTR{removable}=="1", GOTO="persistent_storage_end"
 
 # probe filesystem metadata of optical drives which have a media inserted
-KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="/sbin/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
+KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="?*", IMPORT{program}="@sbindir@/blkid -o udev -p -u noraid -O $env{ID_CDROM_MEDIA_SESSION_LAST_OFFSET} $tempnode"
 # single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET
 # single-session CDs do not have ID_CDROM_MEDIA_SESSION_LAST_OFFSET
-KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="/sbin/blkid -o udev -p -u noraid $tempnode"
+KERNEL=="sr*", ENV{DISK_EJECT_REQUEST}!="?*", ENV{ID_CDROM_MEDIA_TRACK_COUNT_DATA}=="?*", ENV{ID_CDROM_MEDIA_SESSION_LAST_OFFSET}=="", IMPORT{program}="@sbindir@/blkid -o udev -p -u noraid $tempnode"
 
 # probe filesystem metadata of disks
 
 # probe filesystem metadata of disks
-KERNEL!="sr*", IMPORT{program}="/sbin/blkid -o udev -p $tempnode"
+KERNEL!="sr*", IMPORT{program}="@sbindir@/blkid -o udev -p $tempnode"
 
 # watch metadata changes by tools closing the device after writing
 KERNEL!="sr*", OPTIONS+="watch"
 
 # watch metadata changes by tools closing the device after writing
 KERNEL!="sr*", OPTIONS+="watch"
diff --git a/rules/rules.d/80-drivers.rules b/rules/rules.d/80-drivers.rules
deleted file mode 100644 (file)
index cf89735..0000000
+++ /dev/null
@@ -1,12 +0,0 @@
-# do not edit this file, it will be overwritten on update
-
-ACTION=="remove", GOTO="drivers_end"
-
-DRIVER!="?*", ENV{MODALIAS}=="?*", RUN+="/sbin/modprobe -bv $env{MODALIAS}"
-SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="/sbin/modprobe -bv tifm_sd"
-SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="/sbin/modprobe -bv tifm_ms"
-SUBSYSTEM=="memstick", RUN+="/sbin/modprobe -bv --all ms_block mspro_block"
-SUBSYSTEM=="i2o", RUN+="/sbin/modprobe -bv i2o_block"
-SUBSYSTEM=="module", KERNEL=="parport_pc", RUN+="/sbin/modprobe -bv ppdev"
-
-LABEL="drivers_end"
diff --git a/rules/rules.d/80-drivers.rules.in b/rules/rules.d/80-drivers.rules.in
new file mode 100644 (file)
index 0000000..9616135
--- /dev/null
@@ -0,0 +1,12 @@
+# do not edit this file, it will be overwritten on update
+
+ACTION=="remove", GOTO="drivers_end"
+
+DRIVER!="?*", ENV{MODALIAS}=="?*", RUN+="@sbindir@/modprobe -bv $env{MODALIAS}"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="SD", RUN+="@sbindir@/modprobe -bv tifm_sd"
+SUBSYSTEM=="tifm", ENV{TIFM_CARD_TYPE}=="MS", RUN+="@sbindir@/modprobe -bv tifm_ms"
+SUBSYSTEM=="memstick", RUN+="@sbindir/modprobe -bv --all ms_block mspro_block"
+SUBSYSTEM=="i2o", RUN+="@sbindir@/modprobe -bv i2o_block"
+SUBSYSTEM=="module", KERNEL=="parport_pc", RUN+="@sbindir@/modprobe -bv ppdev"
+
+LABEL="drivers_end"
index f5f5958934b9dcbe32c11c1cbdfc17e599827194..b0a4964f76316fd4c7348a2046d595401c0e93ff 100644 (file)
@@ -19,7 +19,7 @@ Before=basic.target
 Type=oneshot
 TimeoutSec=180
 RemainAfterExit=yes
 Type=oneshot
 TimeoutSec=180
 RemainAfterExit=yes
-ExecStart=@sbindir@/udevadm settle
+ExecStart=@bindir@/udevadm settle
 
 [Install]
 WantedBy=basic.target
 
 [Install]
 WantedBy=basic.target
index 6d416c2b393da4c2181373bc0606bc387cbbb71c..cd81945c88ccaeba2149c9ca066b6d4d29844d20 100644 (file)
@@ -7,4 +7,4 @@ DefaultDependencies=no
 [Service]
 Type=oneshot
 RemainAfterExit=yes
 [Service]
 Type=oneshot
 RemainAfterExit=yes
-ExecStart=@sbindir@/udevadm trigger --type=subsystems --action=add ; @sbindir@/udevadm trigger --type=devices --action=add
+ExecStart=@bindir@/udevadm trigger --type=subsystems --action=add ; @bindir@/udevadm trigger --type=devices --action=add
index f93859c78c4979b14be4b1c1a47cf6ee59613db7..c2dc70ef482508af599563629d02918c26f0919f 100755 (executable)
@@ -1158,7 +1158,7 @@ EOF
                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
                exp_name        => "sane",
                rules           => <<EOF
                devpath         => "/devices/pci0000:00/0000:00:1f.2/host0/target0:0:0/0:0:0:0/block/sda/sda1",
                exp_name        => "sane",
                rules           => <<EOF
-SUBSYSTEMS=="scsi", KERNEL=="sda1", PROGRAM=="/bin/echo -e name; (/sbin/badprogram)", RESULT=="name_ _/sbin/badprogram_", SYMLINK+="sane"
+SUBSYSTEMS=="scsi", KERNEL=="sda1", PROGRAM=="/bin/echo -e name; (/usr/bin/badprogram)", RESULT=="name_ _/usr/bin/badprogram_", SYMLINK+="sane"
 EOF
        },
        {
 EOF
        },
        {
index 7db75132476124b0bc940ba973565dcaf0ee46f0..1ea39967fc3476bed7c1874037e9a051617b5254 100644 (file)
@@ -765,7 +765,7 @@ int udev_event_spawn(struct udev_event *event,
                }
        }
 
                }
        }
 
-       /* allow programs in /lib/udev/ to be called without the path */
+       /* allow programs in /usr/lib/udev/ to be called without the path */
        if (argv[0][0] != '/') {
                util_strscpyl(program, sizeof(program), LIBEXECDIR "/", argv[0], NULL);
                argv[0] = program;
        if (argv[0][0] != '/') {
                util_strscpyl(program, sizeof(program), LIBEXECDIR "/", argv[0], NULL);
                argv[0] = program;
index f540a5ae7ba20db294783cef217f8a6f9b3ef211..f3e248eb4fc96a30e5870ed39f9afee39bf0286d 100644 (file)
@@ -1798,13 +1798,13 @@ struct udev_rules *udev_rules_new(struct udev *udev, int resolve_names)
        if (udev_get_rules_path(udev) == NULL) {
                char filename[UTIL_PATH_SIZE];
 
        if (udev_get_rules_path(udev) == NULL) {
                char filename[UTIL_PATH_SIZE];
 
-               /* /lib/udev -- default/package rules */
+               /* /usr/lib/udev -- system rules */
                add_matching_files(udev, &file_list, LIBEXECDIR "/rules.d", ".rules");
 
                add_matching_files(udev, &file_list, LIBEXECDIR "/rules.d", ".rules");
 
-               /* /etc/udev -- system-specific/user/admin rules */
+               /* /etc/udev -- local administration rules */
                add_matching_files(udev, &file_list, SYSCONFDIR "/udev/rules.d", ".rules");
 
                add_matching_files(udev, &file_list, SYSCONFDIR "/udev/rules.d", ".rules");
 
-               /* /run/udev -- throw-away/temporary rules */
+               /* /run/udev -- runtime rules */
                util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/rules.d", NULL);
                add_matching_files(udev, &file_list, filename, ".rules");
        } else {
                util_strscpyl(filename, sizeof(filename), udev_get_run_path(udev), "/rules.d", NULL);
                add_matching_files(udev, &file_list, filename, ".rules");
        } else {
index ab82012cee8a92d2c12fa04db0397f86132f621b..7b31173b21870f6cc159e0331a7d342ec4f44b81 100644 (file)
@@ -41,8 +41,8 @@
   </refsect1>
 
   <refsect1><title>Configuration</title>
   </refsect1>
 
   <refsect1><title>Configuration</title>
-    <para>udev configuration files are placed in <filename>/etc/udev/</filename>
-    and <filename>/lib/udev/</filename>. All empty lines or lines beginning with
+    <para>udev configuration files are placed in <filename>/etc/udev</filename>
+    and <filename>/usr/lib/udev</filename>. All empty lines or lines beginning with
     '#' are ignored.</para>
 
     <refsect2><title>Configuration file</title>
     '#' are ignored.</para>
 
     <refsect2><title>Configuration file</title>
@@ -71,9 +71,9 @@
 
     <refsect2><title>Rules files</title>
       <para>The udev rules are read from the files located in the
 
     <refsect2><title>Rules files</title>
       <para>The udev rules are read from the files located in the
-      system rules directory <filename>/lib/udev/rules.d/</filename>,
-      the local administration directory <filename>/etc/udev/rules.d/</filename>
-      and the volatile runtime directory <filename>/run/udev/rules.d/</filename>.
+      system rules directory <filename>/usr/lib/udev/rules.d</filename>,
+      the local administration directory <filename>/etc/udev/rules.d</filename>
+      and the volatile runtime directory <filename>/run/udev/rules.d</filename>.
       All rules files are collectively sorted and processed in lexical order,
       regardless of the directories in which they live. However, files with
       identical file names replace each other. Files in <filename>/run</filename>
       All rules files are collectively sorted and processed in lexical order,
       regardless of the directories in which they live. However, files with
       identical file names replace each other. Files in <filename>/run</filename>
             detached from the event process itself.</para>
             <para>If no absolute path is given, the program is expected to live in
             the directory provided at compile-time to configure via --libexecdir
             detached from the event process itself.</para>
             <para>If no absolute path is given, the program is expected to live in
             the directory provided at compile-time to configure via --libexecdir
-            (this is usually <filename>/lib/udev</filename>), otherwise the absolute
+            (this is usually <filename>/usr/lib/udev</filename>), otherwise the absolute
             path must be specified. The program name and following arguments are
             separated by spaces. Single quotes can be used to specify arguments with
             spaces.</para>
             path must be specified. The program name and following arguments are
             separated by spaces. Single quotes can be used to specify arguments with
             spaces.</para>
                 <listitem>
                   <para>Apply the permissions specified in this rule to the static device node with
                   the specified name. Static device nodes might be provided by kernel modules
                 <listitem>
                   <para>Apply the permissions specified in this rule to the static device node with
                   the specified name. Static device nodes might be provided by kernel modules
-                  or copied from <filename>/lib/udev/devices</filename>. These nodes might not have
+                  or copied from <filename>/usr/lib/udev/devices</filename>. These nodes might not have
                   a corresponding kernel device at the time udevd is started; they can trigger
                   automatic kernel module loading.</para>
                 </listitem>
                   a corresponding kernel device at the time udevd is started; they can trigger
                   automatic kernel module loading.</para>
                 </listitem>
index d335e2ec88b019e86a12ec936ec7eee3548909fe..c516eb9793de343d4c22202e3701b7421af04ed2 100644 (file)
@@ -37,7 +37,7 @@
     instructions specified in udev rules. See <citerefentry>
         <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
       </citerefentry>.</para>
     instructions specified in udev rules. See <citerefentry>
         <refentrytitle>udev</refentrytitle><manvolnum>7</manvolnum>
       </citerefentry>.</para>
-    <para>On startup the content of the directory <filename>/lib/udev/devices</filename>
+    <para>On startup the content of the directory <filename>/usr/lib/udev/devices</filename>
     is copied to <filename>/dev</filename>. If kernel modules specify static device
     nodes, these nodes are created even without a corresponding kernel device, to
     allow on-demand loading of kernel modules. Matching permissions specified in udev
     is copied to <filename>/dev</filename>. If kernel modules specify static device
     nodes, these nodes are created even without a corresponding kernel device, to
     allow on-demand loading of kernel modules. Matching permissions specified in udev