diff --git a/packages/sysutils/udev/config/udev.rules.d.sample/README b/packages/sysutils/udev/config/udev.rules.d.sample/README new file mode 100644 index 0000000000..7d69732b35 --- /dev/null +++ b/packages/sysutils/udev/config/udev.rules.d.sample/README @@ -0,0 +1,25 @@ +The files in this directory are read by udev(7) and used when events +are performed by the kernel. The udev daemon watches this directory +with inotify so that changes to these files are automatically picked +up, for this reason they must be files and not symlinks to another +location as in the case in Debian. + +Packages do not generally install rules here, this directory is for +local rules. If you want to override behaviour of package-supplied +rules, which can be found in /lib/udev/rules.d, you can do one of +two things: + + 1) Write your own rules in this directory that assign the name, + symlinks, permissions, etc. that you want. Pick a number higher + than the rules you want to override, and yours will be used. + + 2) Copy the file from /lib/udev/rules.d and edit it here; you + should generally only do this if you want to prevent a program + from being run. + + +If the ordering of files in this directory are not important to you, +it's recommended that you simply name your files "descriptive-name.rules" +such that they are processed AFTER all numbered rules in both this +directory and /lib/udev/rules.d and thus override anything set there. + diff --git a/packages/sysutils/udev/init.d/11_udevd b/packages/sysutils/udev/init.d/11_udevd index c9e9649feb..9d05584300 100644 --- a/packages/sysutils/udev/init.d/11_udevd +++ b/packages/sysutils/udev/init.d/11_udevd @@ -25,5 +25,9 @@ progress "starting udev daemon" echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug - mkdir -p /dev/rules.d + if [ -d /storage/.config/udev.rules.d ] ; then + ln -sf /storage/.config/udev.rules.d /dev/rules.d + else + mkdir -p /dev/rules.d + fi /lib/udev/udevd --daemon diff --git a/packages/sysutils/udev/install b/packages/sysutils/udev/install index 94ea542ef6..4462ae052d 100755 --- a/packages/sysutils/udev/install +++ b/packages/sysutils/udev/install @@ -75,3 +75,6 @@ mkdir -p $INSTALL/lib/udev/devices mkdir -p $INSTALL/etc/udev cp $PKG_BUILD/src/udev.conf $INSTALL/etc/udev ln -sf /dev/rules.d $INSTALL/etc/udev/rules.d + +mkdir -p $INSTALL/usr/config + cp -R $PKG_DIR/config/*.sample $INSTALL/usr/config