Commit ef602810 authored by Daniel Reurich's avatar Daniel Reurich

Merge branch 'suites/experimental'

parents 38e7d6cc 4bed3af7
This diff is collapsed.
Source: eudev
Section: admin
Priority: optional
Maintainer: Svante Signell <svante.signell@gmail.com>
Uploaders: Ivan J. <parazyd@dyne.org>, Anto <aryanto@chello.at>, Centurion_Dan <daniel@centurion.net.nz>
Standards-Version: 3.9.8
Vcs-Git: https://git.devuan.org/devuan-packages/eudev.git
Vcs-Browser: https://git.devuan.org/devuan-packages/eudev.git
Homepage: https://wiki.gentoo.org/wiki/Project:Eudev
Build-Depends: debhelper (>= 9.20160114),
dpkg-dev (>= 1.17.14),
pkg-config,
docbook-xsl,
docbook-xml,
m4,
dh-autoreconf,
automake (>= 1.13),
autoconf (>= 2.63),
intltool,
gperf,
gnu-efi [amd64 i386 arm64],
libcap-dev (>= 1:2.24-9~),
libselinux1-dev (>= 2.1.9),
libacl1-dev,
libkmod-dev (>= 15),
libblkid-dev (>= 2.25),
gobject-introspection,
libglib-object-introspection-perl,
xsltproc
Package: eudev
Section: admin
Priority: important
Architecture: linux-any
Multi-Arch: foreign
Provides: udev (= 1:${source:Version})
Conflicts: udev (<< 1:${source:Version}), hal
Replaces: udev (>= 215),
bash-completion (<< 1:2.1)
Pre-Depends: debconf, ${misc:Pre-Depends}
Depends: ${shlibs:Depends},
${misc:Depends},
adduser,
libeudev1 (= ${binary:Version}),
lsb-base (>= 3.0-6),
util-linux (>= 2.27.1),
s390-tools (>> 1.6.2) [s390],
procps
Breaks: consolekit (<< 0.4.6-1),
kmod (<< 14),
systemd (>> 220),
plymouth (<< 0.9.0-7),
bash-completion (<< 1:2.1),
Description: /dev/ and hotplug management daemon
eudev is a daemon which dynamically creates and removes device nodes from
/dev/, handles hotplug events and loads drivers at boot time.
Package: libeudev1
Section: libs
Priority: important
Architecture: linux-any
Multi-Arch: same
Replaces: libudev1 (<< 1:${source:Version})
Provides: libudev1 (= 1:${source:Version})
Conflicts: libudev1 (<< 1:${source:Version})
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends},
${misc:Depends}
Description: libeudev shared library
This library provides access to eudev device information.
Package: libeudev-dev
Section: libdevel
Priority: optional
Architecture: linux-any
Multi-Arch: same
Replaces: libudev-dev (<< 1:${source:Version})
Provides: libudev-dev (= 1:${source:Version})
Conflicts: libudev-dev (<< 1:${source:Version})
Pre-Depends: ${misc:Pre-Depends}
Depends: ${shlibs:Depends},
${misc:Depends},
libeudev1 (= ${binary:Version})
Description: libeudev development files
This package contains the files needed for developing applications that
use libeudev1.
Package: eudev-udeb
Build-Profiles: <!noudeb>
XC-Package-Type: udeb
Section: debian-installer
Priority: optional
Architecture: linux-any
Depends: ${shlibs:Depends},
${misc:Depends},
util-linux-udeb
Description: /dev/ and hotplug management daemon
eudev is a daemon which dynamically creates and removes device nodes from
/dev/, handles hotplug events and loads drivers at boot time.
.
This is a minimal version, only for use in the installation system.
Package: libeudev1-udeb
Build-Profiles: <!noudeb>
Package-Type: udeb
Section: debian-installer
Priority: optional
Architecture: linux-any
Depends: ${shlibs:Depends},
${misc:Depends}
Description: libeudev shared library
This library provides access to eudev device information.
.
This is a minimal version, only for use in the installation system.
Format: http://www.debian.org/doc/packaging-manuals/copyright-format/1.0/
Upstream-Name: eudev
Upstream-Contact: blueness@gentoo.org
Source: https://github.com/gentoo/eudev/
Files: debian/*
Copyright: 2010-2013 Tollef Fog Heen <tfheen@debian.org>
2013 Michael Biebl <biebl@debian.org>
2013 Michael Stapelberg <stapelberg@debian.org>
2015-2016 Jaret Jay Cantu <jaret@realitysend.com>
2016-2016 Anto <aryanto@chello.at>
2017 Ivan J. <parazyd@dyne.org>
2017 Svante Signell <svante.signell@gmail.com>
License: LGPL-2.1+
Files: *
Copyright: 2008-2013 Kay Sievers <kay@vrfy.org>
2010-2013 Lennart Poettering
2012-2013 Zbigniew Jędrzejewski-Szmek <zbyszek@in.waw.pl>
1991-2012 Free Software Foundation, Inc.
1995-2004 Miquel van Smoorenburg
1999 Tom Tromey
2000 Red Hat, Inc.
2008-2010 David Zeuthen <davidz@redhat.com>
2009 Alan Jenkins <alan-jenkins@tuffmail.co.uk>
2009-2013 Intel Corporation
2009-2013 Auke Kok <auke-jan.h.kok@intel.com>
2010 ProFUSION embedded systems
2010 Maarten Lankhorst
2010, 2012 Harald Hoyer
2011 Michal Schmidt
2012 B. Poettering <fsprg@point-at-infinity.org>
2012 Holger Hans Peter Freyther
2012 Dan Walsh
2012 Roberto Sassu
2012 David Strauss <david@davidstrauss.net>
2012 Marti Raudsepp <marti@juffo.org>
2013 Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2013 Linux Foundation
2013 Daniel Mack <daniel@zonque.org>
2013 Marius Vollmer
2013 Jan Janssen
2013 Thomas H.P. Andersen
2013 Daniel Buch
2013 Simon Peeters
2013 Nathaniel Chen <nathaniel.chen@intel.com>
2013 Steven Hiscocks
2014 Luca Barbato <lu_zero@gentoo.org>
2014 Anthony G. Basile <blueness@gentoo.org>
2014 Francisco Izquierdo <klondike@gentoo.org>
2014 Ian Stakenvicius <axs@gentoo.org>
2014 Matthew Thode <prometheanfire@gentoo.org>
2014 Tony Vroon <tony@linx.net>
2014 Richard Yao <ryao@gentoo.org>
License: LGPL-2.1+
Files: src/shared/MurmurHash2.h
src/shared/MurmurHash2.c
Copyright: 2008 Austin Appleby
License: public-domain
MurmurHash2 was written by Austin Appleby, and is placed in the public
domain. The author hereby disclaims copyright to this source code.
Files: src/core/securebits.h
Copyright: Linus Torvalds <torvalds@athlon.transmeta.com>
License: GPL-2
Files: src/shared/ioprio.h
Copyright: Jens Axboe <axboe@suse.de>
License: GPL-2
Files: src/shared/sparse-endian.h
Copyright: 2012 Josh Triplett <josh@joshtriplett.org>
License: Expat
Files: test/rule-syntax-check.py
test/rules-test.sh
Copyright: 2010 Canonical Ltd.
2010 Martin Pitt <martin.pitt@ubuntu.com>
License: GPL-2+
Files: src/udev/*
Copyright: 2004-2012 Kay Sievers <kay@vrfy.org>
2003-2004 Greg Kroah-Hartman <greg@kroah.com>
2003 IBM Corp.
2004 Chris Friesen <chris_friesen@sympatico.ca>
2004 David Zeuthen <david@fubar.dk>
2005 SUSE Linux Products GmbH, Germany
2005 Hannes Reinecke <hare@suse.de>
2009 Canonical Ltd.
2009 Scott James Remnant <scott@netsplit.com>
2009 Martin Pitt <martin.pitt@ubuntu.com>
2009 Piter Punk <piterpunk@slackware.com>
2010 Lennart Poettering
2011 ProFUSION embedded systems
2011 2011 Karel Zak <kzak@redhat.com>
License: GPL-2+
Files: src/udev/udev-ctrl.c
src/udev/udevadm-hwdb.c
src/udev/udev-builtin.c
src/udev/udev-builtin-net_id.c
src/udev/udev-builtin-hwdb.c
src/udev/udev-builtin-btrfs.c
Copyright: 2007-2012 Kay Sievers <kay@vrfy.org>
License: LGPL-2.1+
License: Expat
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
.
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.
License: GPL-2
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; version 2 of the License.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License
along with this program; if not, write to the Free Software Foundation, Inc.,
51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA.
.
On Debian and systems the full text of the GNU General Public
License version 2 can be found in the file
`/usr/share/common-licenses/GPL-2`
License: GPL-2+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 2, or (at your option)
any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
.
You should have received a copy of the GNU General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
.
On Debian systems, the complete text of the GNU General Public License
version 2 can be found in ‘/usr/share/common-licenses/GPL-2’.
License: LGPL-2.1+
This program is free software; you can redistribute it and/or modify
it under the terms of the GNU Lesser General Public License as published by
the Free Software Foundation; either version 2.1, or (at your option)
any later version.
.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU Lesser General Public License for more details.
.
You should have received a copy of the GNU Lesser General Public License along
with this program; if not, write to the Free Software Foundation,
Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
.
On Debian systems, the complete text of the GNU Lesser General Public
License version 2.1 can be found in ‘/usr/share/common-licenses/LGPL-2.1’.
etc/udev/udev.conf
etc/udev/hwdb.d/*.hwdb lib/udev/hwdb.d
lib/udev
bin/udevadm
sbin/udevadm
sbin/udevd
lib/udev/ata_id
lib/udev/scsi_id
lib/udev/cdrom_id
lib/udev/rules.d/50-udev-default.rules
lib/udev/rules.d/60-cdrom_id.rules
lib/udev/rules.d/60-persistent-input.rules
lib/udev/rules.d/60-persistent-storage.rules
lib/udev/rules.d/64-btrfs.rules
lib/udev/rules.d/75-net-description.rules
lib/udev/rules.d/75-probe_mtd.rules
lib/udev/rules.d/80-drivers.rules
../../extra/rules/50-firmware.rules lib/udev/rules.d/
../../extra/rules/73-special-net-names.rules lib/udev/rules.d/
../../extra/rules/73-usb-net-by-mac.rules lib/udev/rules.d/
../../extra/start-udev lib/debian-installer/
../bin/udevadm /sbin/udevadm
eudev (3.2.2-8+devuan2) experimental; urgency=medium
eudev was forked as (215:1.9-1) from systemd (215-17) by Jaret Jay
Cantu <jaret@realitysend.com> Thu, 14 May 2015.
Current Devuan version is (3.2.2-9+devuan2) Thu, 30 Nov 2017
This text is from: systemd (220-7).
The mechanism for providing stable network interface names changed.
Previously they were kept in /etc/udev/rules.d/70-persistent-net.rules
which mapped device MAC addresses to the (arbitrary) name they got when
they first appeared (i. e. mostly at the time of installation). As this
had several problems and is not supported any more, this is deprecated in
favor of the "net.ifnames" mechanism. With this most of your network
interfaces will get location-based names. If you have ifupdown, firewall,
or other configuration that relies on the old names, you need to update
these by Debian 10/Ubuntu 18.04 LTS, and then remove
/etc/udev/rules.d/70-persistent-net.rules. Please see
/usr/share/doc/udev/README.Debian.gz for details about this.
-- Martin Pitt <mpitt@debian.org> Mon, 15 Jun 2015 15:30:29 +0200
This documents udev integration Debian specifics. Please see man udev(7) and
its referenced manpages for general documentation.
Network interface naming
~~~~~~~~~~~~~~~~~~~~~~~~
Since version 197 udev has a builtin persistent name generator which checks
firmware/BIOS provided index numbers or slot names (similar to biosdevname),
falls back to slot names (PCI numbers, etc., in the spirit of
/dev/disks/by-path/), and then optionally falls back to MAC address, and
generates names based on these properties. This provides "location oriented"
names for PCI cards such as "enp0s1" for ethernet, or wlp1s0" for a WIFI card
so that replacing a broken network card does not change the name. As location
based naming does not work well for USB devices, these use a MAC based naming
schema (see /lib/udev/rules.d/73-usb-net-by-mac.rules).
This has been enabled by default since udev 220-7, which affects new
installations/hardware. Existing installations/hardware which already got
covered by the old 75-persistent-net-generator.rules will keep their interface
names, see below.
You can disable these stable names and go back to the kernel-provided ones
(which don't have a stable order) in one of two ways:
- Put "net.ifnames=0" into the kernel command line (e. g. in
/etc/default/grub's GRUB_CMDLINE_LINUX_DEFAULT, then run "update-grub").
- Disable the default *.link rules with
"ln -s /dev/null /etc/systemd/network/99-default.link"
and rebuild the initrd with "update-initramfs -u".
See this page for more information:
http://www.freedesktop.org/wiki/Software/systemd/PredictableNetworkInterfaceNames/
Legacy persistent network interface naming
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Debian releases up to 8 ("Jessie") and Ubuntu up to 15.04 had an udev rule
/lib/udev/rules.d/75-persistent-net-generator.rules which fixed the name of a
network interface that it got when its MAC address first appeared in a
dynamically created /etc/udev/rules.d/70-persistent-net.rules file.
This had inherent race conditions (which sometimes caused collisions and
interface names like "rename1"), required having to write state into /etc
(which isn't possible for read-only root), and did not work in virtualized
environments.
This old schema is deprecated in Debian 9 ("Stretch"), and will not
be supported any more in Debian 10.
Migration to the current network interface naming
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
On package upgrade systems will keep their current names, but they will need to
be manually migrated by Debian 10 / Ubuntu 18.04 LTS. If you rely on the old
names in custom ifupdown stanzas, firewall scripts or other networking
configuration, these need to be updated to the new names.
First, determine all relevant network interface names: those in
/etc/udev/rules.d/70-persistent-net.rules, or if that does not exist (in
virtual machines), in "ip link" or /sys/class/net/.
Then for every interface name use a command like
grep -r eth0 /etc
to find out where it is being used.
Then on "real hardware" machines, rename the file to
70-persistent-net.rules.old; on VMs remove the file
/etc/udev/rules.d/80-net-setup-link.rules instead.
Reboot, adjust configuration files, and test your system.
Custom net interface naming
~~~~~~~~~~~~~~~~~~~~~~~~~~~
In some cases it is convenient to define your own specific names for network
interfaces. These can be customized in two different ways:
* You can create your own names via udev rules, based on arbitrary attribute
and property matches. See man udev(7) for documentation how to write udev
rules. For example, you can create /etc/udev/rules.d/76-netnames.rules with
------------ snip ----------
# identify device by MAC address
SUBSYSTEM=="net", ACTION=="add", ATTR{address}=="11:22:aa:bb:cc:33", NAME="eth-dmz"
# identify by vendor/model ID
SUBSYSTEM=="net", ACTION=="add", ENV{ID_VENDOR_ID}=="0x8086", \
ENV{ID_MODEL_ID}=="0x1502", NAME="eth-intel-gb"
# USB device by path
# get ID_PATH if not present yet
ENV{ID_PATH}=="", IMPORT{builtin}="path_id"
SUBSYSTEM=="net", ACTION=="add", ENV{ID_PATH}=="*-usb-0:3:1*", NAME="eth-blue-hub"
------------ snip ----------
The name of the rules file needs to have a prefix smaller than "80" so that
it runs before /lib/udev/rules.d/80-net-setup-link.rules, and should have a
prefix bigger than "75" so that it runs after 75-net-description.rules and
thus you can use matches on ID_VENDOR and similar properties.
* Unless you disabled net.ifnames, you can change the policy
(kernel/bios/path/MAC based naming) in an /etc/systemd/network/*.link file,
for individual devices or entire device classes. See man systemd.link(5) for
details about this. /lib/systemd/network/99-default.link is the default
policy, and /lib/systemd/network/01-mac-for-usb.link makes it use MAC based
names for USB devices.
Any of the above changes require an initrd update with "update-initramfs -u" to
get effective.
Using udev with LDAP or NIS
~~~~~~~~~~~~~~~~~~~~~~~~~~~
If the rules files reference usernames or groups not present in the
/etc/{passwd,group} files and the system is configured to use a
network-based database like LDAP or NIS then udev may fail at boot time
because users and groups are looked up well before the network has been
initialized.
A possible solution is to configure /etc/nsswitch.conf like this:
passwd: files ldap [UNAVAIL=return]
group: files ldap [UNAVAIL=return]
The nsswitch.conf syntax is documented in the glibc manual.
#!/bin/sh
REPORTBUG_VERSION=$(dpkg-query -f '${source:Version}' -W reportbug)
# Depending on whether reportbug is new enough, we either write the output of
# our various commands to a file and attach them to the report (this needs
# reportbug ≥ 6.5.0) or just write them to the body of the bug report.
if dpkg --compare-versions "$REPORTBUG_VERSION" ge "6.5.0"; then
# We don’t clean up this directory because there is no way to know when
# reportbug finished running, and reportbug needs the files around.
# Given that those are just a couple of kilobytes in size and people
# generally don’t file a lot of bugs, I don’t think it’s a big deal.
DIR=$(mktemp -d)
echo "-- BEGIN ATTACHMENTS --" >&3
udevadm info --export-db >$DIR/udev-database.txt
echo "$DIR/udev-database.txt" >&3
echo "-- END ATTACHMENTS --" >&3
else
_header() {
echo "--------------" >&3
echo "$1:" >&3
echo "--------------" >&3
}
_header "udev database"
udevadm info --export-db >&3
fi
#!/bin/sh -e
### BEGIN INIT INFO
# Provides: eudev udev
# Required-Start: mountkernfs
# Required-Stop:
# Default-Start: S
# Default-Stop:
# Short-Description: Start udevd, populate /dev and load drivers.
### END INIT INFO
# we need to unmount /dev/pts/ and remount it later over the devtmpfs
unmount_devpts() {
if mountpoint -q /dev/pts/; then
umount -n -l /dev/pts/
fi
if mountpoint -q /dev/shm/; then
umount -n -l /dev/shm/
fi
}
# mount a devtmpfs over /dev, if somebody did not already do it
mount_devtmpfs() {
if grep -E -q "^[^[:space:]]+ /dev devtmpfs" /proc/mounts; then
mount -n -o remount,size=$tmpfs_size,mode=0755 -t devtmpfs devtmpfs /dev
return
fi
if ! mount -n -o size=$tmpfs_size,mode=0755 -t devtmpfs devtmpfs /dev; then
log_failure_msg "udev requires devtmpfs support, not started"
log_end_msg 1
fi
return 0
}
create_dev_makedev() {
if [ -e /sbin/MAKEDEV ]; then
ln -sf /sbin/MAKEDEV /dev/MAKEDEV
else
ln -sf /bin/true /dev/MAKEDEV
fi
}
# If the initramfs does not have /run, the initramfs udev database must
# be migrated from /dev/.udev/ to /run/udev/.
move_udev_database() {
[ -e "/dev/.udev/" ] || return 0
[ ! -e /run/udev/ ] || return 0
[ -e /run/ ] || return 0
mountpoint -q /run/ || return 0
mv /dev/.udev/ /run/udev/ || true
}
supported_kernel() {
case "$(uname -r)" in
2.[012345].*|2.6.[0-9]|2.6.[0-9][!0-9]*) return 1 ;;
2.6.[12][0-9]|2.6.[12][0-9][!0-9]*) return 1 ;;
2.6.3[0-1]|2.6.3[0-1][!0-9]*) return 1 ;;
esac
return 0
}
# shell version of /usr/bin/tty
my_tty() {
[ -x /bin/readlink ] || return 0
[ -e /proc/self/fd/0 ] || return 0
readlink --silent /proc/self/fd/0 || true
}
warn_if_interactive() {
if [ "$RUNLEVEL" = "S" -a "$PREVLEVEL" = "N" ]; then
return
fi
TTY=$(my_tty)
if [ -z "$TTY" -o "$TTY" = "/dev/console" -o "$TTY" = "/dev/null" ]; then
return
fi
printf "\n\n\nIt has been detected that the command\n\n\t$0 $*\n\n"
printf "has been run from an interactive shell.\n"
printf "It will probably not do what you expect, so this script will wait\n"
printf "60 seconds before continuing. Press ^C to stop it.\n"
printf "RUNNING THIS COMMAND IS HIGHLY DISCOURAGED!\n\n\n\n"
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 --output=/proc/self/fd/1 | \
while read type name mode uid gid age arg; do
[ -e $name ] && continue
case "$type" in
c|b|c!|b!) mknod -m $mode $name $type $(echo $arg | sed 's/:/ /') ;;
d|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
PATH="/sbin:/bin"
# defaults
tmpfs_size="10M"
if [ -e /etc/udev/udev.conf ]; then
. /etc/udev/udev.conf
fi
. /lib/lsb/init-functions
if ! supported_kernel; then
log_failure_msg "udev requires a kernel >= 2.6.32, not started"
log_end_msg 1
fi
if [ ! -e /proc/filesystems ]; then
log_failure_msg "udev requires a mounted procfs, not started"
log_end_msg 1
fi
if ! grep -q '[[:space:]]devtmpfs$' /proc/filesystems; then
log_failure_msg "udev requires devtmpfs support, not started"
log_end_msg 1
fi
if [ ! -d /sys/class/ ]; then
log_failure_msg "udev requires a mounted sysfs, not started"
log_end_msg 1
fi
if ! ps --no-headers --format args ax | egrep -q '^\['; then
log_warning_msg "udev does not support containers, not started"
exit 0
fi
if [ -d /sys/class/mem/null -a ! -L /sys/class/mem/null ] || \
[ -e /sys/block -a ! -e /sys/class/block ]; then
log_warning_msg "CONFIG_SYSFS_DEPRECATED must not be selected"
log_warning_msg "Booting will continue in 30 seconds but many things will be broken"
sleep 30
fi
# When modifying this script, do not forget that between the time that the
# new /dev has been mounted and udevadm trigger has been run there will be
# no /dev/null. This also means that you cannot use the "&" shell command.
case "$1" in
start)
if mountpoint -q /dev/; then
TMPFS_MOUNTED=1
elif [ -e "/dev/.udev/" ]; then
log_warning_msg ".udev/ already exists on the static /dev"
fi
if [ ! -e "/dev/.udev/" -a ! -e "/run/udev/" ]; then
warn_if_interactive
fi
if [ -w /sys/kernel/uevent_helper ]; then
echo > /sys/kernel/uevent_helper
fi
move_udev_database
if [ -z "$TMPFS_MOUNTED" ]; then
unmount_devpts
mount_devtmpfs
[ -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
# set the SELinux context for devices created in the initramfs
[ -x /sbin/restorecon ] && /sbin/restorecon -R /dev
log_daemon_msg "Starting the hotplug events dispatcher" "udevd"
if udevd --daemon; then
log_end_msg $?
else
log_warning_msg $?
log_warning_msg "Waiting 15 seconds and trying to continue anyway"
sleep 15
fi
log_action_begin_msg "Synthesizing the initial hotplug events"
if udevadm trigger --action=add; then
log_action_end_msg $?
else
log_action_end_msg $?
fi
create_dev_makedev
# wait for the udevd childs to finish
log_action_begin_msg "Waiting for /dev to be fully populated"
if udevadm settle; then
log_action_end_msg 0
else
log_action_end_msg 0 'timeout'
fi
;;
stop)
log_daemon_msg "Stopping the hotplug events dispatcher" "udevd"
if start-stop-daemon --stop --name udevd --user root --quiet --oknodo --retry 5; then
log_end_msg $?
else
log_end_msg $?
fi
;;
restart)
log_daemon_msg "Stopping the hotplug events dispatcher" "udevd"
if start-stop-daemon --stop --name udevd --user root --quiet --oknodo --retry 5; then
log_end_msg $?
else
log_end_msg $? || true
fi