#!/bin/sh
 
FIRST_START=no
if test ! -e /mnt/disk0/lina_monitor
then
 fdisk /dev/hda << EOF
n
p
1
5
979
t
4
w
EOF
 mkdosfs -F 16 /dev/hda1
 mount -o umask=0000,noatime,check=s,shortname=mixed /dev/hda1 /mnt/disk0
 cp /asa/bin/lina /mnt/disk0/lina
 cp /asa/bin/lina_monitor /mnt/disk0/lina_monitor
 FIRST_START=yes
fi
modprobe e100
modprobe e1000
ifconfig eth0 up
ifconfig eth1 up
ifconfig eth2 up
ifconfig eth3 up
ifconfig eth4 up
ifconfig eth5 up
if test $FIRST_START = yes
then
 echo ""
 echo ""
 echo "This is your first boot, please wait about 1 min and then type the following commands:"
 echo "cd /mnt/disk0"
 echo "/mnt/disk0/lina_monitor"
 echo ""
 echo "Please note to use the following command under ASA to save your configs:"
 echo "copy run disk0:/.private/startup-config"
 echo ""
 exit
fi
cd /mnt/disk0
/mnt/disk0/lina_monitor

