Commit 31ff902a authored by Martin Pitt's avatar Martin Pitt
Browse files

udev.init: Create static device nodes

This moved out of udevd. Thanks to Michael Biebl for the script!

Closes: #749021
parent a79911a8
......@@ -48,6 +48,8 @@ systemd (208-7) UNRELEASED; urgency=medium
* Add debian/extra/60-keyboard.hwdb: Latest keymaps from upstream git.
This makes it trivial to backport keymap fixes to stable releases.
(Closes: #657809; LP: #1322770, #1339998)
* udev.init: Create static device nodes, as this moved out of udevd.
Thanks to Michael Biebl for the script! (Closes: #749021)
-- Michael Biebl <biebl@debian.org> Thu, 17 Jul 2014 00:48:14 +0200
......
......@@ -87,6 +87,26 @@ warn_if_interactive() {
sleep 60
}
make_static_nodes() {
[ -e /lib/modules/$(uname -r)/modules.devname ] || return 0
[ -x /bin/kmod ] || return 0
/bin/kmod static-nodes --format=tmpfiles | \
while read type name mode uid gid age arg; do
[ -e $name ] && continue
case "$type" in
c|b) mknod -m $mode $name $type $(echo $arg | sed 's/:/ /') ;;
d) mkdir $name ;;
*) echo "unparseable line ($type $name $mode $uid $gid $age $arg)" >&2 ;;
esac
if [ -x /sbin/restorecon ]; then
/sbin/restorecon $name
fi
done
}
##############################################################################
[ -x /sbin/udevd ] || exit 0
......@@ -163,6 +183,8 @@ case "$1" in
[ -d /proc/1 ] || mount -n /proc
fi
make_static_nodes
# clean up parts of the database created by the initramfs udev
udevadm info --cleanup-db
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment