#!/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 if [ "$(readlink $proc/exe)" = /sbin/udevd ]; then # errors must be ignored due to a race with udevd child processes # naturally terminating kill ${proc#/proc/} 2> /dev/null || true fi done # move the /dev tmpfs to the rootfs 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