From patchwork Thu Mar 22 16:20:01 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Joshua Henderson X-Patchwork-Id: 889450 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.133; helo=hemlock.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=microchip.com Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 406X2N2gwbz9s0w for ; Fri, 23 Mar 2018 03:20:11 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 33E558A333; Thu, 22 Mar 2018 16:20:07 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id ZdRb-ng2k+Ty; Thu, 22 Mar 2018 16:20:05 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 6677B8A335; Thu, 22 Mar 2018 16:20:05 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from hemlock.osuosl.org (smtp2.osuosl.org [140.211.166.133]) by ash.osuosl.org (Postfix) with ESMTP id 3F18D1CF0CA for ; Thu, 22 Mar 2018 16:20:04 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id 3C6A88A345 for ; Thu, 22 Mar 2018 16:20:04 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id H76FxvtAuj+B for ; Thu, 22 Mar 2018 16:20:03 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from esa6.microchip.iphmx.com (esa6.microchip.iphmx.com [216.71.154.253]) by hemlock.osuosl.org (Postfix) with ESMTPS id 5B3EC8A333 for ; Thu, 22 Mar 2018 16:20:03 +0000 (UTC) X-IronPort-AV: E=Sophos;i="5.48,345,1517900400"; d="scan'208";a="9948210" Received: from smtpout.microchip.com (HELO email.microchip.com) ([198.175.253.82]) by esa6.microchip.iphmx.com with ESMTP/TLS/AES128-SHA; 22 Mar 2018 09:20:02 -0700 Received: from jhenderson-hp.microchip.com (10.10.76.4) by CHN-SV-EXCH01.mchp-main.com (10.10.76.37) with Microsoft SMTP Server id 14.3.352.0; Thu, 22 Mar 2018 09:20:01 -0700 From: Joshua Henderson To: Date: Thu, 22 Mar 2018 09:20:01 -0700 Message-ID: <1521735601-29879-1-git-send-email-joshua.henderson@microchip.com> X-Mailer: git-send-email 2.7.4 MIME-Version: 1.0 Subject: [Buildroot] [PATCH] eudev: prevent udev init script nonexistent directory error X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.24 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Bernd Kuhls , Eric Le Bihan Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" The following error occures in the udev init script because the kernel config may optionally not include uevent_helper. /etc/init.d/S10udev: line 47: can't create /proc/sys/kernel/hotplug: nonexistent directory Work around this by not trying to access the destination if it's not available. Signed-off-by: Joshua Henderson Acked-by: "Yann E. MORIN" --- package/eudev/S10udev | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/eudev/S10udev b/package/eudev/S10udev index 640fec6..47c715c 100755 --- a/package/eudev/S10udev +++ b/package/eudev/S10udev @@ -28,7 +28,7 @@ test -r $UDEV_CONFIG || exit 6 case "$1" in start) printf "Populating %s using udev: " "${udev_root:-/dev}" - printf '\000\000\000\000' > /proc/sys/kernel/hotplug + [ -e /proc/sys/kernel/hotplug ] && printf '\000\000\000\000' > /proc/sys/kernel/hotplug $UDEV_BIN -d || { echo "FAIL"; exit 1; } udevadm trigger --type=subsystems --action=add udevadm trigger --type=devices --action=add