All of lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [git commit] eudev: don't test if the binary exists in the init script
@ 2018-04-16  5:34 Thomas Petazzoni
  0 siblings, 0 replies; only message in thread
From: Thomas Petazzoni @ 2018-04-16  5:34 UTC (permalink / raw)
  To: buildroot

commit: https://git.buildroot.net/buildroot/commit/?id=6246ea7d14809cab4e0737f07f43fd026e2d008c
branch: https://git.buildroot.net/buildroot/commit/?id=refs/heads/master

The test doesn't make sense. It just exits with error code 5 if the
binary doesn't exist, which is silly. Buildroot installs both udevd and
its init script as part of the same package. But if it ever happens for
some reason, the error message "/sbin/udevd: No such file or directory"
in the start case should be pretty clear.

Replace the UDEV_BIN variable, which was used only once, by the full
path of the binary file.

Signed-off-by: Carlos Santos <casantos@datacom.ind.br>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
---
 package/eudev/S10udev | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/package/eudev/S10udev b/package/eudev/S10udev
index 47c715c886..4e799d6507 100755
--- a/package/eudev/S10udev
+++ b/package/eudev/S10udev
@@ -16,10 +16,6 @@
 #	/dev/zero, /dev/null -- that's needed to boot and run this script.
 #
 
-# Check for missing binaries
-UDEV_BIN=/sbin/udevd
-test -x $UDEV_BIN || exit 5
-
 # Check for config file and read it
 UDEV_CONFIG=/etc/udev/udev.conf
 test -r $UDEV_CONFIG || exit 6
@@ -29,7 +25,7 @@ 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
-        $UDEV_BIN -d || { echo "FAIL"; exit 1; }
+        /sbin/udevd -d || { echo "FAIL"; exit 1; }
         udevadm trigger --type=subsystems --action=add
         udevadm trigger --type=devices --action=add
         udevadm settle --timeout=30 || echo "udevadm settle failed"

^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2018-04-16  5:34 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-04-16  5:34 [Buildroot] [git commit] eudev: don't test if the binary exists in the init script Thomas Petazzoni

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.