commit 8495ab1be0d5140c355f0066d8cb1de388256ad9
Author: Jan RÄ™korajski <[email protected]>
Date:   Wed Jul 31 18:52:26 2013 +0200

    - creating static device nodes have been removed from udevd,
      we have to do this manually in start_udev to properly support
      those in SysV init environment

 start_udev | 27 ++++++++++++++++++++++++++-
 1 file changed, 26 insertions(+), 1 deletion(-)
---
diff --git a/start_udev b/start_udev
index e55e0ef..1c91a38 100755
--- a/start_udev
+++ b/start_udev
@@ -38,7 +38,29 @@ udevd=/lib/udev/udevd
 # trim traling slash, code expects it not to be there
 udev_root=${udev_root%/}
 
-make_extra_nodes () {
+create_static_nodes() {
+       /sbin/kmod static-nodes --format=tmpfiles | \
+       while read type file mode uid gid age dev ; do
+               case $type in
+                       d|D)
+                               mkdir -p --mode=$mode $file
+                               ;;
+                       *)
+                               oldIFS=$IFS
+                               IFS=":"
+                               set -- $dev
+                               maj=$1
+                               min=$2
+                               IFS=$oldIFS
+                               mknod --mode=$mode $file $type $maj $min
+                               ;;
+               esac
+               [ $uid = "-" ] || chown $uid $file
+               [ $gid = "-" ] || chgrp $gid $file
+       done
+}
+
+make_extra_nodes() {
        grep '^[^#]' /etc/udev/links.conf | \
        while read type name arg1; do
                [ "$type" -a "$name" -a ! -e "$udev_root/$name" -a ! -L 
"/dev/$name" ] ||continue
@@ -111,6 +133,9 @@ awk "\$2 == \"$udev_root\" && \$3 == \"devtmpfs\" { exit 1 
}" /proc/mounts && {
 
 kill_udevd > "$udev_root/null" 2>&1
 
+# Create required static device nodes for the current kernel
+create_static_nodes
+
 # Start udevd daemon
 $udevd --daemon; rc=$?
 test $rc -eq 0 && ok || fail
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/systemd.git/commitdiff/8f6058f06fe5cbfbb7dc5968ceab23b3e0614df1

_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit

Reply via email to