Skip to contentSkip to conversation

package/eudev: support configuration via drop-in

PATCH In review Simon Rowe 1 participant 2 messages Aug 13, 2024 – Aug 22, 2024

lore
Share & tools
lore

Simon Rowe

author
#0 lore raw

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.

---
 package/eudev/S10udev | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
package/eudev/S10udev +10 -2
index 4e799d6507..6f20fc51f5 100644
@@ -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
author
#1 lore raw

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.

---
 package/eudev/S10udev | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
package/eudev/S10udev +10 -2
index 4e799d6507..6f20fc51f5 100644
@@ -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