From patchwork Mon Oct 20 18:26:52 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Gustavo Zacarias X-Patchwork-Id: 401219 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ozlabs.org (Postfix) with ESMTP id 18F2E14008E for ; Tue, 21 Oct 2014 05:28:52 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 5839491790; Mon, 20 Oct 2014 18:28:51 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PT-XgSW+FpAu; Mon, 20 Oct 2014 18:28:49 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by whitealder.osuosl.org (Postfix) with ESMTP id CF37D91702; Mon, 20 Oct 2014 18:28:49 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 9BFEE1C2250 for ; Mon, 20 Oct 2014 18:28:48 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 976A091702 for ; Mon, 20 Oct 2014 18:28:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PSNkWS5wjAap for ; Mon, 20 Oct 2014 18:28:47 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from www.zacarias.com.ar (www.zacarias.com.ar [62.210.192.172]) by whitealder.osuosl.org (Postfix) with ESMTPS id DBCA3916EC for ; Mon, 20 Oct 2014 18:28:46 +0000 (UTC) Received: from asgard (cpe-186-23-17-245.telecentro-reversos.com.ar [186.23.17.245] (may be forged)) (authenticated bits=0) by www.zacarias.com.ar (8.14.9/8.14.9) with ESMTP id s9KISe9X004772 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO); Mon, 20 Oct 2014 18:28:43 GMT DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=zacarias.com.ar; s=dkey; t=1413829724; bh=tmpaDCNGbif2xEB/ABHIi3UQTKDQzsQQ9MNrVN/xpS4=; h=From:To:Cc:Subject:Date; b=dL6tDcM/YSVBVaSNypemBPz2C38wzvuUJAYWeE1cZTfMyD6SS+M40pxKzy5IloFsv T7IgMu12UukMqXhndu0dz83ZWblaSnrkg9MuBa6yuivgGI1aOL2YmT/d2uqAy0BUM/ irlQrnGDQsL5wkG+EnYYg14gLrVjlTXLliTE/CWY= Received: by asgard (sSMTP sendmail emulation); Mon, 20 Oct 2014 15:26:52 -0300 From: Gustavo Zacarias To: buildroot@busybox.net Date: Mon, 20 Oct 2014 15:26:52 -0300 Message-Id: <1413829612-12373-1-git-send-email-gustavo@zacarias.com.ar> X-Mailer: git-send-email 2.0.4 X-Virus-Scanned: clamav-milter 0.98.4 at www X-Virus-Status: Clean Subject: [Buildroot] [PATCHv2] package/eudev: tweak initscript X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Make the udev initscript trigger in a coherent way, i.e. first set subsystems, then device and then let the whole thing settle. Otherwise for usb_modeswitch udev rules they never kick in since the storage aspect (device) gets claimed first and the switch ignored. Also set the settle timeout to a smaller value than the default 120 seconds to avoid stalling too much. Signed-off-by: Gustavo Zacarias Acked-by: "Yann E. MORIN" --- package/eudev/S10udev | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/package/eudev/S10udev b/package/eudev/S10udev index 107dfd5..c3eafce 100755 --- a/package/eudev/S10udev +++ b/package/eudev/S10udev @@ -30,8 +30,9 @@ case "$1" in printf "Populating ${udev_root:-/dev} using udev: " printf '\000\000\000\000' > /proc/sys/kernel/hotplug $UDEV_BIN -d || (echo "FAIL" && exit 1) - udevadm trigger --action=add - udevadm settle + udevadm trigger --type=subsystems --action=add + udevadm trigger --type=devices --action=add + udevadm settle --timeout=30 || echo "udevadm settle failed" echo "done" ;; stop)