eudev: don't test if the binary exists in the init script
authorCarlos Santos <casantos@datacom.ind.br>
Mon, 16 Apr 2018 02:29:24 +0000 (23:29 -0300)
committerThomas Petazzoni <thomas.petazzoni@bootlin.com>
Mon, 16 Apr 2018 05:34:40 +0000 (07:34 +0200)
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

index 47c715c8863879c363631604be7ebfb875b81622..4e799d65073bf945b9f6bbf05e7d660ff2da92c5 100755 (executable)
 #      /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"