mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
From: Clemens Gruber <clemens.gruber@pqgruber.com>
To: ptxdist@pengutronix.de
Cc: Clemens Gruber <clemens.gruber@pqgruber.com>
Subject: [ptxdist] [PATCH v2] udev: fix error on kernels without uevent helpers
Date: Tue, 23 Jun 2015 16:36:02 +0200	[thread overview]
Message-ID: <1435070162-6890-1-git-send-email-clemens.gruber@pqgruber.com> (raw)

Current kernel docs recommend disabling CONFIG_UEVENT_HELPER.

If disabled however, the following error message is shown:
/etc/rc.d/S00udev: line 95: can't create /proc/sys/kernel/hotplug:
nonexistent directory

This patch fixes it by checking if /sys/kernel/uevent_helper exists.

Signed-off-by: Clemens Gruber <clemens.gruber@pqgruber.com>

---

Sorry for the previous mail, I made a mistake in the conditional.

---
 projectroot/etc/init.d/udev | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/projectroot/etc/init.d/udev b/projectroot/etc/init.d/udev
index 1020b40..5c1bf42 100644
--- a/projectroot/etc/init.d/udev
+++ b/projectroot/etc/init.d/udev
@@ -50,7 +50,9 @@ start)
 
 	# udev handles uevents itself, so we don't need to have
 	# the kernel call out to any binary in response to them
-	echo > /proc/sys/kernel/hotplug
+	if [ -e /sys/kernel/uevent_helper ]; then
+		echo > /proc/sys/kernel/hotplug
+	fi
 
 	echo "creating static nodes"
 	make_extra_nodes
-- 
2.4.4


-- 
ptxdist mailing list
ptxdist@pengutronix.de

                 reply	other threads:[~2015-06-23 14:36 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1435070162-6890-1-git-send-email-clemens.gruber@pqgruber.com \
    --to=clemens.gruber@pqgruber.com \
    --cc=ptxdist@pengutronix.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox