Commit Graph

24 Commits

Author SHA1 Message Date
Topi Miettinen
32c0a18d2b
Delete empty lines at end of file
Upstream commit hooks don't allow empty lines and of course they serve no
purpose.

Signed-off-by: Topi Miettinen <toiwoton@gmail.com>
2020-05-16 11:25:10 +03:00
Michael Biebl
8d810fda9a udev.init: Use new s-s-d --notify-await to start udev daemon
Fixes a race condition during startup under SysV init.
Add versioned dependency on dpkg (>= 1.19.3) to ensure that a version
of start-stop-daemon which supports --notify-await is installed.

Closes: #908796
2019-03-11 18:58:31 +01:00
Michael Biebl
0b2292a999 udev.init: Trigger add events for subsystems
Update the SysV init script and mimic the behaviour of the initramfs and
systemd-udev-trigger.service which first trigger subsystems and then
devices during the coldplug stage.

See also 4d0d6d9d31.
2019-01-04 00:15:20 +01:00
Felipe Sateler
c05e4e13e2 Fix container check in udev init script
Udev needs writable /sys, so the init script tried to check before starting.
Unfortunately, the check was inverted. Let's add the missing ! to negate the check.

Closes: #915261
2018-12-02 11:05:39 -03:00
Michael Biebl
94cfd94d09 Simplify container check in udev SysV init script
Instead of using "ps" to detect a container environment, simply test if
/sys is writable. This matches what's used in systemd-udevd.service via
ConditionPathIsReadWrite=/sys and follows
https://www.freedesktop.org/wiki/Software/systemd/ContainerInterface/

This means we no longer need procps, so drop that dependency from the
udev package.

Closes: #915095
2018-12-02 01:03:50 +01:00
Michael Biebl
83c4ec535c Clean up SysV init script a bit while at it
Drop no longer needed check and convert tabs to spaces.

Gbp-Dch: Ignore
2018-09-07 08:41:08 +02:00
Michael Biebl
e803efca59 Remove udev control socket on shutdown under sysvinit
The udev control socket is no longer removed automatically when the
daemon is stopped. As this can confuse other software, update the SysV
init script to remove the control socket manually and make sure the init
script is executed on shutdown (runlevel 0) and reboot (runlevel 6).

Closes: #791944
2018-09-07 08:40:16 +02:00
Michael Biebl
b015c192b3 Drop upstart jobs for udev 2017-03-02 13:51:22 +01:00
Martin Pitt
470c174f69 debian/udev.init: Drop noexec from /dev again
According to upstream (https://github.com/systemd/systemd/pull/1265) some
device drivers expose memory-mapped device nodes which need "exec". So just set
nosuid.
2015-09-15 07:17:17 +02:00
Martin Pitt
63dff1e213 debian/udev.init: Mount /dev file system with nosuid and noexec
LP: #1450960
2015-09-14 08:18:28 +02:00
Michael Biebl
0ee61e098c Remove any vestiges of /dev/.udev/
This directory has been replaced by /run/udev/ since wheezy.
2015-06-02 01:15:33 +02:00
Michael Biebl
64723e627e Stop using /sbin/udevd and drop the compat symlink 2015-06-02 01:15:27 +02:00
Michael Biebl
36ba81c3dc debian/udev.init: Recognize '!' flag with static device lists
To work with kmod 20.

Closes: #780263
2015-03-26 11:16:14 +01:00
Michael Biebl
0d3c155c39 Don't write to /sys/kernel/uevent_helper unconditionally
Fix udev SysV init script and d-i start script to not write to
/sys/kernel/uevent_helper unconditionally to not fail on a kernel with
CONFIG_UEVENT_HELPER unset.

Closes: #756312
2014-08-20 22:31:08 +02:00
Michael Biebl
046fd6b09c Don't rely on /dev/stdout when creating static device nodes under sysvinit
"kmod static-nodes" will write its output to /dev/stdout by default.
That device node is created by udevd as a symlink to /proc/self/fd/1.
Since we run make_static_nodes() in the udev SysV init script before
udevd is started, this device node is not guaranteed to exist and kmod
fails to deal with that properly.
As a workaround, use "kmod static-nodes --output=/proc/self/fd/1".

Closes: #757830
2014-08-20 22:23:15 +02:00
Martin Pitt
31ff902af6 udev.init: Create static device nodes
This moved out of udevd. Thanks to Michael Biebl for the script!

Closes: #749021
2014-08-06 13:14:30 +02:00
Michael Biebl
86ab5f5949 Fix boot failures if CONFIG_UEVENT_HELPER is disabled
Drop the obsolete check for /sys/kernel/uevent_helper from postinst and
the SysV init script and do not unconditionally overwrite it in the
initramfs hook. Since a long time now udev has been using the netlink
interface to communicate with the kernel and with Linux 3.16 it is
possible to disable CONFIG_UEVENT_HELPER completely.

Closes: #752742
2014-06-28 00:01:00 +02:00
Martin Pitt
2493e4e89e 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.
2014-04-26 20:25:56 +02:00
Michael Biebl
6b3cc5b26b Use devtmpfs instead of tmpfs
udev now requires devtmpfs, so update the SysV init script and various
other places to use devtmpfs instead of tmpfs.  Closes: #722604
2013-09-18 00:05:18 +02:00
Michael Biebl
ca07bb2bc4 Use /dev instead of $udev_root
UDEV_ROOT is no longer configurable, so simply use /dev everywhere.
See also dbad4c2a8d
2013-09-18 00:05:18 +02:00
Michael Stapelberg
dbad4c2a8d udev.init: drop experimental support for "$udev_root" != "/dev" 2013-07-18 19:29:19 +02:00
Michael Stapelberg
c4671ce831 drop debian/extra/write_dev_root_rule (discouraged upstream for a long time)
This file created /dev/root, but programs should not rely on that
anyway. If this breaks anything, we need to fix it in that particular
program.

See also http://bugs.debian.org/670146
2013-07-18 19:29:19 +02:00
Michael Biebl
6ab50b03cf Add changes from 175-7.1 NMU (upstart support)
Patch courtesy of Steve Langasek <steve.langasek@ubuntu.com>
2013-07-18 19:29:15 +02:00
Michael Biebl
b56f8637a1 Merge remaining files from udev 175-7
The patches from udev were either merged upstream, applied directly,
added as files to debian/extra/ or dropped:

- debian/patches/commit-4b50a3d
  Applied upstream in 4b50a3d004
- debian/patches/fix_gtkdoc_oot
  Fixed upstream
- debian/patches/libudevpc_no_librt
  Fixed upstream in e712ffcce6
- debian/patches/vio_type
  Dropped for now.
- debian/patches/debian_rules
  Added as debian/extra/rules/*
- debian/patches/extra_agents
  Added as debian/extra/*.agent and debian/extra/hotplug.functions
- debian/patches/extra_initramfs
  Added as debian/extra/initramfs.*
- debian/patches/extra_installer
  Added as debian/extra/udev.*
- debian/patches/extra_modprobeconf
  Added as debian/extra/fbdev-blacklist.conf and
  debian/extra/make-fbdev-blacklist
- debian/patches/extra_misc
  Added as debian/extra/links.conf and debian/extra/create_static_nodes
- debian/patches/dont-build-some-helpers
  Dropped, since we will use the upstream firmware agent now
- debian/patches/libgudev_in_usr
  Applied as 418b0a2d41
- debian/patches/rules_compat_qemu
  Dropped, only needed for kernel versions <= 2.6.32
- debian/patches/use_run_tmpfs
  Dropped, since wheezy /run is mandatory
- debian/patches/dev_root_rule
  Dropped, discouraged upstream
- debian/patches/udevd_in_sbin
  Dropped, we will use the $libexec path now in the .service file and
  provide compat symlinks
- udev_conf_comments
  Applied as c82d84e916
2013-07-18 18:57:39 +02:00