#!/bin/sh

if ! grep -q devtmpfs /proc/mounts; then
        if grep -q devtmpfs /proc/filesystems; then
                mount -t devtmpfs devtmpfs /dev
        else
                mount -t tmpfs tmpfs /dev  -o size=64k,mode=0755
                rm /dev/null
                mknod /dev/null c 1 3
                mkdir /dev/pts /dev/shm
                mount -t devpts devpts /dev/pts
        fi
fi

echo > /dev/mdev.seq

echo "/sbin/mdev" >/proc/sys/kernel/hotplug

touch /dev/.udev

[ -d "/sys/kernel" ] || mount sysfs /sys -t sysfs

mdev -s
