#! /bin/sh

# $Id: create_ramdisk 3325 2006-03-27 13:09:43Z lange $

# create a writeable area on the install client

mount -n -t proc proc /proc
# start devfsd if needed
if [ -c /dev/.devfsd ]; then
    /sbin/devfsd /dev
fi

# if we have shm use it as ramdisk
mount -t tmpfs tmpfs /tmp || {
    ramdevice=/dev/ram0
    mke2fs -q -m 0 $ramdevice && echo "ramdisk $ramdevice created"
    mount -n $ramdevice /tmp
}
mkdir -p /tmp/etc /tmp/target

mkrw /dev /var/run /var/log /var/lock /var/lib/discover /etc/sysconfig
