diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:49:53 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-04-10 20:49:53 +0000 |
commit | 87aefc960557c2fb6fdf9ea4c1ac0e7983f68f68 (patch) | |
tree | 263fc56d7d40512aaa09193905008a3f4e3b0018 /debian/extra/initramfs-tools/scripts | |
parent | Adding upstream version 255.4. (diff) | |
download | systemd-87aefc960557c2fb6fdf9ea4c1ac0e7983f68f68.tar.xz systemd-87aefc960557c2fb6fdf9ea4c1ac0e7983f68f68.zip |
Adding debian version 255.4-1.debian/255.4-1
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'debian/extra/initramfs-tools/scripts')
-rwxr-xr-x | debian/extra/initramfs-tools/scripts/init-bottom/udev | 28 | ||||
-rwxr-xr-x | debian/extra/initramfs-tools/scripts/init-top/udev | 31 |
2 files changed, 59 insertions, 0 deletions
diff --git a/debian/extra/initramfs-tools/scripts/init-bottom/udev b/debian/extra/initramfs-tools/scripts/init-bottom/udev new file mode 100755 index 0000000..73887ea --- /dev/null +++ b/debian/extra/initramfs-tools/scripts/init-bottom/udev @@ -0,0 +1,28 @@ +#!/bin/sh -e + +PREREQS="" + +prereqs() { echo "$PREREQS"; } + +case "$1" in + prereqs) + prereqs + exit 0 + ;; +esac + +# Stop udevd, we'll miss a few events while we run init, but we catch up +udevadm control --exit + +# move the /dev tmpfs to the rootfs; fall back to util-linux mount that does +# not understand -o move +mount -n -o move /dev "${rootmnt:?}/dev" || mount -n --move /dev "${rootmnt}/dev" + +# create a temporary symlink to the final /dev for other initramfs scripts +if command -v nuke >/dev/null; then + nuke /dev +else + # shellcheck disable=SC2114 + rm -rf /dev +fi +ln -s "${rootmnt}/dev" /dev diff --git a/debian/extra/initramfs-tools/scripts/init-top/udev b/debian/extra/initramfs-tools/scripts/init-top/udev new file mode 100755 index 0000000..11ae72a --- /dev/null +++ b/debian/extra/initramfs-tools/scripts/init-top/udev @@ -0,0 +1,31 @@ +#!/bin/sh -e + +PREREQS="" + +prereqs() { echo "$PREREQS"; } + +case "$1" in + prereqs) + prereqs + exit 0 + ;; +esac + +if [ -w /sys/kernel/uevent_helper ]; then + echo > /sys/kernel/uevent_helper +fi + +if [ "${quiet:-n}" = "y" ]; then + log_level=notice +else + log_level=info +fi + +SYSTEMD_LOG_LEVEL=$log_level /usr/lib/systemd/systemd-udevd --daemon --resolve-names=never + +udevadm trigger --type=subsystems --action=add +udevadm trigger --type=devices --action=add +udevadm settle || true + +# Leave udev running to process events that come in out-of-band (like USB +# connections) |