[oe] [PATCH] udev 141: fix postinst check for /lib/udev/rules.d symlink

Michael Smith msmith at cbnco.com
Tue Nov 16 19:21:05 UTC 2010


[ -d foo ] succeeds even if foo is a symlink to a directory.

Signed-off-by: Michael Smith <msmith at cbnco.com>
---
 recipes/udev/udev_141.bb |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/recipes/udev/udev_141.bb b/recipes/udev/udev_141.bb
index 816637f..7a34ada 100644
--- a/recipes/udev/udev_141.bb
+++ b/recipes/udev/udev_141.bb
@@ -7,7 +7,7 @@ DEFAULT_PREFERENCE = "-1"
 
 require udev.inc
 
-PR = "${INC_PR}.2"
+PR = "${INC_PR}.3"
 
 SRC_URI += "file://mount.blacklist \
 	    file://run.rules \
@@ -107,7 +107,7 @@ else
 fi
 update-rc.d $OPT udev-cache start 12 S .
 
-if [ -d $D/lib/udev/rules.d ] ; then
+if [ -e $D/lib/udev/rules.d ] && [ ! -L $D/lib/udev/rules.d ] ; then
 	echo "$D/lib/udev/rules.d is not a symlink, fixing that"
 	mv $D/lib/udev/rules.d/* $D${sysconfdir}/udev/rules.d/
 	rm -rf $D/lib/udev/rules.d
-- 
1.6.3.2





More information about the Openembedded-devel mailing list