Debian Codegraph @

debian/extra/initramfs-tools/scripts/init-bottom/udev

raw symbols SCIP
1 #!/bin/shscip-shell filesystem . . `/bin/sh`. -e
2
3 PREREQS=""
4
5 prereqsscip-shell shell systemd 261~rc3-1 prereqs().() { echoscip-shell system . . echo. "$PREREQS"; }
6
7 case "$1" in
8 prereqs)
9 prereqsscip-shell shell systemd 261~rc3-1 prereqs().
10 exit 0
11 ;;
12 esac
13
14 # Stop udevd, we'll miss a few events while we run init, but we catch up
15 # Wait for current workers to stop (at most for a minute to avoid deadlocks)
16 # otherwise there will be lock files left under /run/ (see: #1056564)
17 udevadm settle --timeout=60
18 udevadm control --exit
19
20 # move the /dev tmpfs to the rootfs; fall back to util-linux mount that does
21 # not understand -o move
22 mountscip-shell system . . mount. -n -o move /devscip-shell filesystem . . `/dev`. "${rootmnt:?}/dev" || mountscip-shell system . . mount. -n --move /devscip-shell filesystem . . `/dev`. "${rootmnt}/dev"
23
24 # create a temporary symlink to the final /dev for other initramfs scripts
25 if command -v nuke >/dev/nullscip-shell filesystem . . `/dev/null`.; then
26 nuke /devscip-shell filesystem . . `/dev`.
27 else
28 # shellcheck disable=SC2114
29 rmscip-shell system . . rm. -rf /devscip-shell filesystem . . `/dev`.
30 fi
31 lnscip-shell system . . ln. -s "${rootmnt}/dev" /devscip-shell filesystem . . `/dev`.