#! /bin/sh

mount -a

# set hostname
#echo "Setting hostname" &
hostname openrisc &

#remount everything, read/write
#echo "Remounting root" &
mount -o remount,rw /

# create some dirs to avoid warning messages
mkdir -p /var/run && \
mkdir -p /etc/network/if-up.d && \
mkdir -p /etc/network/if-pre-up.d &

# make home directory for root user
mkdir -p /root &

# telnetd requires this
mkdir -p /dev/pts && \
mount -t devpts none /dev/pts &

#echo "Configuring loopback device"
#ifconfig lo 127.0.0.1

#ifup lo &

# clear ethernet's IP
#echo "Bringing up eth0"
#ifconfig eth0 192.168.1.100 &
#ifconfig eth0 up

#route add default gw 192.168.1.1

#ifup -a

#alternative
#setup dhcp
#echo "Launching udhcpc"
#/sbin/udhcpc -n -q -s /usr/share/udhcpc/default.script


# inetd startup
#inetd &

