4 echo "Mounting normal file systems"
6 mkdir /proc > /dev/null 2>&1
7 mount -t proc proc /proc
8 mkdir /sys > /dev/null 2>&1
10 mount -t sysfs sys /sys
11 mkdir -p /dev/pts > /dev/null 2>&1
13 mount -t devpts devpts /dev/pts
15 mount /tmp > /dev/null 2>&1
19 echo "Creating serial devices"
21 ln -s /dev/ttyS0 /dev/gps0
23 mknod -m 0664 /dev/pps0 c 252 0
24 ln -s /dev/pps0 /dev/gpspps0
26 # mount the config file system
27 mkdir /fs > /dev/null 2>&1
29 mount /dev/sda1 /fs > /dev/null 2>&1
31 echo "Looking for system config"
32 if [ -f /fs/config/system ]
34 echo ".... found - loading"
38 echo "Looking for dropbear config"
39 if [ -f /fs/config/dropbear.tar ]
43 echo ".... found - installing"
44 tar xf /fs/config/dropbear.tar
48 # create the interfaces layout
49 echo "Setting up network interfaces configuration"
51 cat << EOF > /etc/network/interfaces
53 iface lo inet loopback
57 # create network interfaces bit
58 if [ "x$INTERFACE" == "xdhcp" ]
60 echo ".... eth0 - dhcp"
61 cat << EOF >> /etc/network/interfaces
67 # static network address
68 if [ "x$NET_ADDRESS" != "x" ]
71 echo ".... eth0 - static $NET_ADDRESS - $NET_MASK"
72 cat << EOF >> /etc/network/interfaces
74 iface eth0 inet static
81 if [ "x$NET_GW" != "x" ]
83 echo ".... eth0 - gateway $NET_GW"
84 cat << EOF >> /etc/network/interfaces
90 if [ "x$NET_SEARCH_DOMAIN" != "x" ]
92 echo ".... eth0 - search domain $NET_SEARCH_DOMAIN"
93 cat << EOF >> /etc/network/interfaces
94 gateway $NET_SEARCH_DOMAIN
99 if [ "x$NET_DNS_SERVERS" != "x" ]
101 echo ".... eth0 - dns servers $NET_DNS_SERVERS"
102 cat << EOF >> /etc/network/interfaces
103 gateway $NET_DNS_SERVERS