udev 141: fix postinst check for /lib/udev/rules.d symlink
authorMichael Smith <msmith@cbnco.com>
Tue, 16 Nov 2010 13:52:33 +0000 (08:52 -0500)
committerMichael Smith <msmith@cbnco.com>
Thu, 18 Nov 2010 14:24:41 +0000 (09:24 -0500)
[ -d foo ] succeeds even if foo is a symlink to a directory.

Signed-off-by: Michael Smith <msmith@cbnco.com>
Acked-by: Tom Rini <tom_rini@mentor.com>
recipes/udev/udev_141.bb

index 816637f..7a34ada 100644 (file)
@@ -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