package/eudev: support configuration via drop-in
PATCH 1/1 package/eudev: support configuration via drop-in
Take the arguments for the daemon and the "udevadm settle" command from variables and support defining them in /etc/default/udevd.
Signed-off-by Simon Rowe <[email protected]>
--- package/eudev/S10udev | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
package/eudev/S10udev +10 -2
@@ -16,6 +16,14 @@ # /dev/zero, /dev/null -- that's needed to boot and run this script. # +DAEMON="udevd" + +SETTLE_TIMEOUT=30 +UDEVD_ARGS="-d" + +# shellcheck source=/dev/null +[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON" + # Check for config file and read it UDEV_CONFIG=/etc/udev/udev.conf test -r $UDEV_CONFIG || exit 6
@@ -25,10 +33,10 @@ case "$1" in start) printf "Populating %s using udev: " "${udev_root:-/dev}" [ -e /proc/sys/kernel/hotplug ] && printf '\000\000\000\000' > /proc/sys/kernel/hotplug - /sbin/udevd -d || { echo "FAIL"; exit 1; } + /sbin/udevd $UDEVD_ARGS || { echo "FAIL"; exit 1; } udevadm trigger --type=subsystems --action=add udevadm trigger --type=devices --action=add - udevadm settle --timeout=30 || echo "udevadm settle failed" + udevadm settle --timeout=$SETTLE_TIMEOUT || echo "udevadm settle failed" echo "done" ;; stop)
Signature · 6 lines
2.22.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Ping?
On 13/08/2024, 13:46, "Simon Rowe" <[email protected]> wrote:
Take the arguments for the daemon and the "udevadm settle" command from variables and support defining them in /etc/default/udevd.
Signed-off-by Simon Rowe <[email protected]>
--- package/eudev/S10udev | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-)
package/eudev/S10udev +10 -2
@@ -16,6 +16,14 @@ # /dev/zero, /dev/null -- that's needed to boot and run this script. # +DAEMON="udevd" + +SETTLE_TIMEOUT=30 +UDEVD_ARGS="-d" + +# shellcheck source=/dev/null +[ -r "/etc/default/$DAEMON" ] && . "/etc/default/$DAEMON" + # Check for config file and read it UDEV_CONFIG=/etc/udev/udev.conf test -r $UDEV_CONFIG || exit 6
@@ -25,10 +33,10 @@ case "$1" in start) printf "Populating %s using udev: " "${udev_root:-/dev}" [ -e /proc/sys/kernel/hotplug ] && printf '\000\000\000\000' > /proc/sys/kernel/hotplug - /sbin/udevd -d || { echo "FAIL"; exit 1; } + /sbin/udevd $UDEVD_ARGS || { echo "FAIL"; exit 1; } udevadm trigger --type=subsystems --action=add udevadm trigger --type=devices --action=add - udevadm settle --timeout=30 || echo "udevadm settle failed" + udevadm settle --timeout=$SETTLE_TIMEOUT || echo "udevadm settle failed" echo "done" ;; stop)
--
2.22.3
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot