contrib/*: be more explicit
This commit is contained in:
@@ -15,8 +15,8 @@
|
||||
* OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
|
||||
*
|
||||
*
|
||||
* this helper pretty similar to helper.sh, but it
|
||||
* doesn't write unrelated variables to file (e.g PWD or PATH)
|
||||
* NOTE: you don't need this if you have mdev/mdevd, refer to mdev.conf
|
||||
* NOTE: you need this if you want to use bare-bones CONFIG_UEVENT_HELPER
|
||||
*
|
||||
* build:
|
||||
* cc helper.c -o helper
|
||||
|
||||
@@ -1,13 +1,10 @@
|
||||
#!/bin/sh -f
|
||||
#
|
||||
# this helper required for CONFIG_UEVENT_HELPER aka /proc/sys/kernel/hotplug
|
||||
# for mdev you can use simple one-liner, refer to mdev.conf for more info
|
||||
# NOTE: you don't need this if you have mdev/mdevd, refer to mdev.conf
|
||||
# NOTE: you need this if you want to use bare-bones CONFIG_UEVENT_HELPER
|
||||
#
|
||||
# usage:
|
||||
# echo /full/path/to/helper.sh > /proc/sys/kernel/hotplug
|
||||
# echo "/full/path/to/helper.sh UDEV_MONITOR_DIR" > /proc/sys/kernel/hotplug
|
||||
#
|
||||
|
||||
# NOTE: writing variables to file (e.g PWD or PATH)
|
||||
# that are not related to uevent properties is harmless
|
||||
exec env > "${1:-/tmp/.libudev-zero}/uevent.$$"
|
||||
|
||||
@@ -1,13 +1,12 @@
|
||||
#
|
||||
# example basic mdev config representing libudev-zero usage
|
||||
# uncomment needed rules
|
||||
# example rules for mdev.conf
|
||||
#
|
||||
# NOTE: you must change "/tmp/.libudev-zero" if you use non-default UDEV_MONITOR_DIR
|
||||
# NOTE: mdev can only handle ADD and/or REMOVE events
|
||||
# NOTE: you don't need helper.c or helper.sh, just add this to /etc/mdev.conf
|
||||
|
||||
# will handle all uevents
|
||||
# handle all uevents(not recommended)
|
||||
#-.* root:root 660 *env > /tmp/.libudev-zero/uevent.$$
|
||||
|
||||
# will handle only drm and input uevents (recommended)
|
||||
#SUBSYSTEM=drm;.* root:video 660 *env > /tmp/.libudev-zero/uevent.$$
|
||||
#SUBSYSTEM=input;.* root:input 660 *env > /tmp/.libudev-zero/uevent.$$
|
||||
# handle only drm and input uevents(recommended)
|
||||
SUBSYSTEM=drm;.* root:video 660 *env > /tmp/.libudev-zero/uevent.$$
|
||||
SUBSYSTEM=input;.* root:input 660 *env > /tmp/.libudev-zero/uevent.$$
|
||||
|
||||
Reference in New Issue
Block a user