mirror of
https://github.com/LibreELEC/LibreELEC.tv.git
synced 2025-07-29 13:46:49 +00:00
Merge pull request #451 from stefansaraev/udev
udev: add posibility to use user-defined rules
This commit is contained in:
commit
4457c63e0e
25
packages/sysutils/udev/config/udev.rules.d.sample/README
Normal file
25
packages/sysutils/udev/config/udev.rules.d.sample/README
Normal file
@ -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.
|
||||||
|
|
@ -25,5 +25,9 @@
|
|||||||
|
|
||||||
progress "starting udev daemon"
|
progress "starting udev daemon"
|
||||||
echo -e '\000\000\000\000' > /proc/sys/kernel/hotplug
|
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
|
/lib/udev/udevd --daemon
|
||||||
|
@ -75,3 +75,6 @@ mkdir -p $INSTALL/lib/udev/devices
|
|||||||
mkdir -p $INSTALL/etc/udev
|
mkdir -p $INSTALL/etc/udev
|
||||||
cp $PKG_BUILD/src/udev.conf $INSTALL/etc/udev
|
cp $PKG_BUILD/src/udev.conf $INSTALL/etc/udev
|
||||||
ln -sf /dev/rules.d $INSTALL/etc/udev/rules.d
|
ln -sf /dev/rules.d $INSTALL/etc/udev/rules.d
|
||||||
|
|
||||||
|
mkdir -p $INSTALL/usr/config
|
||||||
|
cp -R $PKG_DIR/config/*.sample $INSTALL/usr/config
|
||||||
|
Loading…
x
Reference in New Issue
Block a user