Commit 2493e4e8 authored by Martin Pitt's avatar Martin Pitt
Browse files

Kill /etc/udev/links.conf, create_static_nodes, and associated code.

It's obsolete with devtmpfs (which is required now), and doesn't run with
systemd or upstart anyway.
parent b3020807
......@@ -35,6 +35,9 @@ systemd (204-9) UNRELEASED; urgency=medium
* Make sd_login_monitor_new() work for logind without systemd.
* Cherry-pick upstream fix for polkit permissions for rebooting with
multiple sessions.
* Kill /etc/udev/links.conf, create_static_nodes, and associated code. It's
obsolete with devtmpfs (which is required now), and doesn't run with
systemd or upstart anyway.
[ Marco d'Itri ]
* preinst: check for all the system calls required by modern releases
......
#!/bin/sh -e
make_extra_nodes() {
[ -e /etc/udev/links.conf ] || return 0
grep '^[^#]' /etc/udev/links.conf | \
while read type name arg1; do
[ "$type" -a "$name" -a ! -e "/$1/$name" -a ! -L "/$1/$name" ] || continue
case "$type" in
L) ln -s $arg1 /$1/$name ;;
D) mkdir -p /$1/$name ;;
M) mknod -m 600 /$1/$name $arg1 ;;
*) echo "links.conf: unparseable line ($type $name $arg1)" >&2 ;;
esac
if [ -x /sbin/restorecon ]; then
/sbin/restorecon /dev/$name
fi
done
}
if [ "$1" ]; then
devdir="$1"
else
devdir='/dev'
fi
make_extra_nodes $devdir
exit 0
# This file does not exist. Please do not ask the Debian maintainer about it.
# If you need manually created devices, create them in /lib/udev/devices/ .
D pts
D shm
M null c 1 3
M console c 5 1
# Hic sunt leones.
M ppp c 108 0
M loop0 b 7 0
D net
M net/tun c 10 200
#!/bin/sh -e
make_extra_nodes() {
[ -e /etc/udev/links.conf ] || return 0
grep '^[^#]' /etc/udev/links.conf | \
while read type name arg1; do
[ "$type" -a "$name" -a ! -e "/dev/$name" -a ! -L "/dev/$name" ] ||continue
case "$type" in
L) ln -s $arg1 /dev/$name ;;
D) mkdir -p /dev/$name ;;
M) mknod -m 600 /dev/$name $arg1 ;;
*) echo "links.conf: unparseable line ($type $name $arg1)" ;;
esac
done
}
echo > /sys/kernel/uevent_helper
if ! grep -E -q "^[^[:space:]]+ /dev devtmpfs" /proc/mounts; then
mount -n -o mode=0755 -t devtmpfs devtmpfs /dev
fi
make_extra_nodes
/lib/systemd/systemd-udevd --daemon --resolve-names=never
......
......@@ -99,8 +99,6 @@ override_dh_install:
install -D --mode=644 \
debian/extra/rules/75-persistent-net-generator.rules \
debian/udev-udeb/lib/udev/rules.d/
install -D --mode=644 debian/extra/links.conf \
debian/udev-udeb/etc/udev/links.conf
mkdir -p debian/udev-udeb/lib/udev
install -D --mode=644 \
debian/extra/hotplug.functions \
......@@ -119,8 +117,6 @@ override_dh_install:
# udev: debian specific rules and helpers
install -D --mode=644 debian/extra/rules/* \
debian/udev/lib/udev/rules.d/
install -D --mode=644 debian/extra/links.conf \
debian/udev/etc/udev/
install -D --mode=644 debian/extra/fbdev-blacklist.conf \
debian/udev/etc/modprobe.d/fbdev-blacklist.conf
install -D --mode=644 \
......@@ -128,7 +124,6 @@ override_dh_install:
debian/extra/rule_generator.functions \
debian/udev/lib/udev/
install -D --mode=755 \
debian/extra/create_static_nodes \
debian/extra/dsl-modem.agent \
debian/extra/logger.agent \
debian/extra/net.agent \
......
......@@ -174,9 +174,6 @@ case "$1" in
# set the SELinux context for devices created in the initramfs
[ -x /sbin/restorecon ] && /sbin/restorecon -R /dev
# /dev/null must be created before udevd is started
/lib/udev/create_static_nodes || true
log_daemon_msg "Starting the hotplug events dispatcher" "udevd"
if udevd --daemon; then
log_end_msg $?
......
rm_conffile /etc/init.d/udev-mtab 204-1~
rm_conffile /etc/udev/links.conf 204-9~
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