# Make sure proc and devfs are mounted when we continue.
if [ ! -d /proc/self ] ; then
	mount -t proc proc /proc
fi
if [ ! -e /dev/.devfsd ] && [ ! -x /sbin/udevd ]; then
	mount -t devfs devfs /dev
fi
if grep -q '[[:space:]]sysfs' /proc/filesystems; then
	mount -t sysfs sysfs /sys
fi

# Cleanup after the first init, which leaves the initrd mounted
# on /initrd (if we're not using initramfs)
umount /initrd/dev 2>/dev/null
umount /initrd 2>/dev/null
if [ "`uname -r | grep '^2.2.'`" = "" ]; then
	freeramdisk /dev/rd/0 2>/dev/null
fi
