Commit Graph

29 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
1454130b26 Install 60-block.rules in udev-udeb and initramfs-tools
The block device rules were split out from 60-persistent-storage.rules
into its own rules file in v220. Those rules ensure that change events
are emitted and the udev db is updated after metadata changes.

Closes: #958397
Thanks: Pascal Hambourg
2020-04-27 17:55:26 +02:00
Dan Streetman
46f3d7af5e Follow symlinks when finding link files to copy into initramfs
If the /{etc,lib}/systemd/network directory itself is a symlink, the find
command will not actually find any of the files in the dir it links to.
Use the find -L param to follow symlinks.

Note that the -L does not need to be provided to the cp command, as when
using only the -p parameter symlinks are followed by default.  Also,
the [ -d ] test follows symlinks by default, and does not need changing.

LP: #1868892
2020-04-14 17:00:36 -04:00
Michael Biebl
c6918ea83c Update udev-udeb to use 73-usb-net-by-mac.link 2019-12-02 23:44:12 +01:00
Benjamin Drung
7abfa8dc77 Fix shellcheck issues in initramfs-tools scripts
initramfs-tools will use shellcheck on its own code and will probably
ship a shellcheck autopkgtest that checks its hooks and script
directory. That's how the shellcheck issues in systemd's initramfs-tools
scripts were found.

```
shellcheck -e SC1091 $(find debian/extra/initramfs-tools/ -type f)
```
2019-01-12 20:36:33 +01:00
Dimitri John Ledkov
4d0d6d9d31
initramfs-tools: trigger udevadm add actions with subsystems first.
This updates the initramfs-tools init-top udev script to trigger udevadm
actions with type specified. This mimicks the
systemd-udev-trigger.service. Without type specified only devices are
triggered, but triggering subsystems may also be required and should happen
before triggering the devices. This is the case for example on s390x with zdev
generated udev rules.

LP: #1713536
2017-08-30 11:10:17 +01:00
Michael Biebl
2a19c5aa85 Drop /sbin/udevadm compat symlink from udev-udeb and initramfs
We can't remove it from debian/udev.links just yet as long as packages
still make use of it [1]. For the udeb and the initramfs it should be
safe to drop though and this way we avoid new packages using the old
path.

[1] https://bugs.debian.org/cgi-bin/pkgreport.cgi?users=pkg-systemd-maintainers@lists.alioth.debian.org;tag=udevadm

Gbp-Dch: Short
2017-03-02 14:05:04 +01:00
Martin Pitt
4f6f3035b9 Install 71-seat.rules into the initrd
This helps plymouth to detect applicable devices.

Closes: #756109
2016-12-01 00:12:51 +01:00
Michael Biebl
7c5512e887 Try mount -n -o move first
initramfs-tools is not actually using util-linux mount (yet), so making
mount -n --move the first alternative would trigger an error message if
users have built their initramfs without busybox support.
2016-11-22 14:44:15 +01:00
Martin Pitt
7da9dce077 Fall back to "mount -o move" in udev initramfs script
klibc's mount does not understand --move, so for the time being we need to
support both variants.

Closes: #845161
2016-11-21 09:52:58 +01:00
Luca Boccassi
5513a0c6c7 Use mount --move in initramfs-tools udev script
Due to recent changes in busybox and initramfs-tools the mount
utility is no longer the one from busybox but from util-linux.
The latter does not support mount -o move.
The former supports both -o move and --move, so use it instead to be
compatible with both.
See this discussion for more details:
https://bugs.debian.org/823856

Closes: #844775
2016-11-19 20:01:17 +01:00
Martin Pitt
b72e3d3b27 Split out udev rule to name USB network interfaces by MAC address into 73-usb-net-by-mac.rules
With that it is easier to disable.

Closes: #824025
2016-05-11 22:48:37 +02:00
Martin Pitt
4bd57cb812 Rename debian/extra/rules/73-idrac.rules to 73-special-net-names.rules
It is going to get rules for other devices. Also install it into the initramfs.
2016-04-11 23:30:40 +02:00
Martin Pitt
2a2e638e94 debian/extra/initramfs-tools/scripts/init-bottom/udev: Prefer "nuke" again
This command comes from klibc-utils, not from initramfs-tools. But fall back to
"rm" if it does not exist.
2016-01-21 09:53:13 +01:00
Martin Pitt
018671ca10 Eliminate "hotplug.functions" udev helper and put the logging functions directly into net.agent
This simplifies the migration of net.agent to ifupdown.
2015-12-27 20:15:54 +01:00
Martin Pitt
d77cf3ba3f debian/extra/initramfs-tools/scripts/init-bottom/udev: Use "rm -rf" instead of "nuke"
"nuke" does not exist any more in current initramfs-tools.
2015-12-10 13:16:22 +01:00
Martin Pitt
022e24e5b3 Copy all custom udev rules into the initramfs
debian/extra/initramfs-tools/hooks/udev: Copy all /etc/udev/rules.d/*.rules
rules which are not merely overriding the one in /lib/, not just
70-persistent-net.rules.  They might contain network names or other bits which
are relevant for the initramfs.

Closes: #795494
2015-10-05 12:36:38 +02:00
Martin Pitt
a2da9792db debian/extra/initramfs-tools/hooks/udev: Don't fail if /etc/systemd/network/ does not exist
Closes: #794050
2015-07-30 08:24:09 +02:00
Martin Pitt
a8bb8caf9c debian/extra/initramfs-tools/hooks/udev: Drop some redundant code
We now always copy 70-persistent-net.rules.
2015-07-28 05:44:13 +02:00
Julian Wollrath
e7c2c9b507 Copy all .link interface naming definitions to initramfs
Currently, only the default .link files from /lib/systemd/network are
copied to the initramfs, meaning, that additional (local) .link naming
definitions will be ignored when the system is still controlled by the
initramfs and interfaces might get wrong names.

Fix this by copying all .link files from /lib/systemd/network and
/etc/systemd/network into the initramfs, with the files from
/etc/systemd/network taking precedence over files with the same name
from /lib/systemd/network, as stated in the systemd.link manpage.

Closes: #793374
2015-07-27 07:18:27 +02:00
Michael Biebl
52d12b880b Drop scsi_wait_scan hack from the udev initramfs-tools script
This Linux kernel module has been broken since 2.6.30 and as a result
was removed in 3.5. The Debian Jessie kernel no longer ships this
module.

Closes: #752775
2015-07-15 23:35:52 +02:00
Martin Pitt
b8fdd6f8f1 Also put old 70-persistent-net.rules into initramfs
The previous commit added the new net.ifnames machinery to initramfs, to get
consistent names in initramfs and the real system. However, we also need to
copy the legacy 70-persistent-net.rules to avoid getting different names in
both places. Thanks Adam Conrad!
2015-07-13 09:02:27 +02:00
Martin Pitt
7b5eb265bb Fix udeb an initramfs for net.ifnames
- debian/udev-udeb.install: Install new bits for net.ifnames.
 - debian/extra/initramfs-tools/hooks/udev: Do the same for initramfs-tools.

LP: #1473542
2015-07-11 11:56:42 +02:00
Michael Biebl
ab077aa604 initramfs hooks: Stop installing rules files for mdadm, lvm2 and dmsetup
Stop installing 55-dm.rules, 64-md-raid.rules,
60-persistent-storage-lvm.rules and 60-persistent-storage-dm.rules.
The mdadm, lvm2 and dmsetup package provide their own udev hooks
nowadays to make sure their udev rules files are installed into the
initramfs.  Having the copy rules at two places is confusing and makes
debugging harder.
2015-06-18 15:47:05 +02:00
Michael Biebl
e05826cb0b Fix typo: persistant → persistent, thanks lintian 2015-06-18 15:36:21 +02:00
Martin Pitt
61e055638c debian/extra/initramfs-tools/scripts/init-top/udev: Drop $ROOTDELAY wait
This does not concern udev in particular, but is handled by initramfs-tools
itself (scripts/local). The intention of this parameter is not to statically
wait for the given time, but wait *up to* that time for the root device to
appear.

Thanks to Thomas Conté for pointing this out!
2015-06-01 15:14:35 +02:00
Martin Pitt
6e33bf38ef When booting with "quiet", run the initramfs' udevd with "notice" log level
This avoids the "starting version XXX" message cluttering the screen in quiet
mode.

LP: #1432171
2015-05-21 07:36:43 +02:00
Martin Pitt
f845e5fdc9 initramfs hook: Install 61-persistant-storage-android.rules if it exists 2015-01-23 12:32:11 +01:00
Martin Pitt
9e1d0901b5 Clean up Debian specific file installation
In debian/rules, remove manual file installation. Move them to
debian/*.install.

Move all Debian specific installed files to debian/extra/.
2015-01-22 09:46:15 +01:00