File: initramfs.bottom

package info (click to toggle)
udev 0.105-4etch1
  • links: PTS
  • area: main
  • in suites: etch
  • size: 672 kB
  • ctags: 54
  • sloc: sh: 1,636; makefile: 273
file content (39 lines) | stat: -rw-r--r-- 904 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
#!/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
for proc in /proc/[0-9]*; do
    [ -x $proc/exe ] || continue
    [ "$(readlink $proc/exe)" != /sbin/udevd ] || kill ${proc#/proc/}
done

# ignore any failed event because the init script will trigger again all events
nuke /dev/.udev/queue/

# Optionally move the real filesystem's /dev to beneath our tmpfs
if [ -e /etc/udev/udev.conf ]; then
    . /etc/udev/udev.conf
fi
if [ -z "$no_static_dev" ]; then
    mkdir -m 0700 -p /dev/.static/
    mkdir /dev/.static/dev/
    mount -n -o bind $rootmnt/dev /dev/.static/dev
fi

# Now move it all to the real filesystem
mount -n -o move /dev $rootmnt/dev

# create a temporary symlink to the final /dev for other initramfs scripts
nuke /dev
ln -s $rootmnt/dev /dev