]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
95udev-rules/module-setup.sh: correctly create udevd symlink
authorHarald Hoyer <harald@redhat.com>
Thu, 20 Oct 2011 10:13:25 +0000 (12:13 +0200)
committerHarald Hoyer <harald@redhat.com>
Thu, 20 Oct 2011 11:06:34 +0000 (13:06 +0200)
modules.d/95udev-rules/module-setup.sh

index 915c1fc76f52a2dc0f8c8626d98c5de01ee31877..5f8bae8b07b479c62670dbc1610a676c6ef92552 100755 (executable)
@@ -63,8 +63,13 @@ install() {
         [ -e /usr/lib/udev/$_i ] && dracut_install /usr/lib/udev/$_i
     done
 
-    [ -x /lib/udev/udevd ] && ln -s ../lib/udev/udevd "$initdir/sbin/udevd"
-    [ -x /usr/lib/udev/udevd ] && ln -s ../usr/lib/udev/udevd "$initdir/sbin/udevd"
+    if ! [ -e "$initdir/sbin/udevd" ]; then
+        if [ -x /usr/lib/udev/udevd ]; then
+            ln -s /usr/lib/udev/udevd "$initdir/sbin/udevd"
+        elif [ -x /lib/udev/udevd ]; then
+            ln -s /lib/udev/udevd "$initdir/sbin/udevd"
+        fi
+    fi
 
     [ -f /etc/arch-release ] && \
         inst "$moddir/load-modules.sh" /lib/udev/load-modules.sh