]>
Commit | Line | Data |
---|---|---|
56d0e3e5 JR |
1 | #!/bin/sh -e |
2 | ||
3 | PREREQS="" | |
4 | ||
5 | prereqs() { echo "$PREREQS"; } | |
6 | ||
7 | case "$1" in | |
8 | prereqs) | |
9 | 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 | for proc in /proc/[0-9]*; do | |
d5d3f439 JR |
16 | [ -x $proc/exe ] || continue |
17 | if [ "$(readlink $proc/exe)" = /sbin/udevd ]; then | |
18 | # errors must be ignored due to a race with udevd child processes | |
19 | # naturally terminating | |
20 | kill ${proc#/proc/} 2> /dev/null || true | |
21 | fi | |
56d0e3e5 JR |
22 | done |
23 | ||
24 | # move the /dev tmpfs to the rootfs | |
25 | mount -n -o move /dev $rootmnt/dev | |
26 | ||
27 | # create a temporary symlink to the final /dev for other initramfs scripts | |
28 | nuke /dev | |
29 | ln -s $rootmnt/dev /dev |