aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Carlos Santos <casantos@datacom.ind.br>2018-01-30 02:07:18 -0200
committerGravatar Peter Korsgaard <peter@korsgaard.com>2018-01-31 12:12:37 +0100
commitafa5cb9c304e02bf82f35fe228c7ac2f13fbc532 (patch)
treeaad3701b3085b0b1b140b9c11cfb71c13439c457
parent320552fbd9e8729f70338d54817138615261710e (diff)
downloadbuildroot-afa5cb9c304e02bf82f35fe228c7ac2f13fbc532.tar.gz
buildroot-afa5cb9c304e02bf82f35fe228c7ac2f13fbc532.tar.bz2
eudev: fix error handling init script
Replace (echo "msg" && exit 1) by { echo "msg"; exit 1; }. The (list) compound command runs in a subshell, so the "exit" interrupts the subshell, not the main script. Examples: $ sh -c "echo 1; (exit 1); echo 2" 1 2 $ sh -c "echo 1; { exit 1; }; echo 2" 1 $ Signed-off-by: Carlos Santos <casantos@datacom.ind.br> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com> (cherry picked from commit 3f568fe09948369831c36a713f5a47fe4c2d19b6) Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
-rwxr-xr-xpackage/eudev/S10udev2
1 files changed, 1 insertions, 1 deletions
diff --git a/package/eudev/S10udev b/package/eudev/S10udev
index 8382bec2bb..654a04df36 100755
--- a/package/eudev/S10udev
+++ b/package/eudev/S10udev
@@ -29,7 +29,7 @@ case "$1" in
start)
printf "Populating ${udev_root:-/dev} using udev: "
printf '\000\000\000\000' > /proc/sys/kernel/hotplug
- $UDEV_BIN -d || (echo "FAIL" && exit 1)
+ $UDEV_BIN -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"