version 1.1.1.1, 2011/07/05 23:43:00
|
version 1.1.1.1.6.3, 2012/03/19 21:29:28
|
Line 22 SYSPKGDIR="/system"
|
Line 22 SYSPKGDIR="/system"
|
BOOTLOG="/var/run/elwix.boot" |
BOOTLOG="/var/run/elwix.boot" |
XML="/etc/config.xml" |
XML="/etc/config.xml" |
|
|
|
MGMT_VLAN="4093" |
|
MGMT_NAME="mgmt" |
|
MGMT_ADDR="10.254.254.254/30" |
|
|
umask 022 |
umask 022 |
|
|
boot() |
boot() |
Line 29 boot()
|
Line 33 boot()
|
echo "Check and mount filesystems ..." |
echo "Check and mount filesystems ..." |
fsck -y 1>/dev/null 2>&1 && mount -a || fsck -f -y |
fsck -y 1>/dev/null 2>&1 && mount -a || fsck -f -y |
|
|
if [ -c /dev/ufs/fit2cf ]; then |
|
echo "Check and mount if its exist fit2cf ..." |
|
fsck -y -tufs /dev/ufs/fit2cf 1>/dev/null 2>&1 && mount -o ro /dev/ufs/fit2cf /elwix/cf || \ |
|
fsck -f -y -tufs /dev/ufs/fit2cf |
|
fi |
|
|
|
echo "Loading elwix firmware variables ..." |
echo "Loading elwix firmware variables ..." |
cd /elwix/altroot |
cd /elwix/altroot |
pax -rw -pe var / |
pax -rw -pe var / |
Line 60 local()
|
Line 58 local()
|
echo "Configurate localhost ..." | tee -a $BOOTLOG |
echo "Configurate localhost ..." | tee -a $BOOTLOG |
ifconfig lo0 127.0.0.1 | tee -a $BOOTLOG 1>/dev/null 2>&1 |
ifconfig lo0 127.0.0.1 | tee -a $BOOTLOG 1>/dev/null 2>&1 |
hostname `cat /etc/myname` |
hostname `cat /etc/myname` |
hostname `xmler -g /elwix/system/hostname $XML` | if [ -x /usr/bin/xmler ]; then |
domainname `xmler -g /elwix/system/domain $XML` | hostname `xmler -g /elwix/system/hostname $XML` |
| domainname `xmler -g /elwix/system/domain $XML` |
| fi |
} |
} |
|
|
geteth() |
geteth() |
Line 75 geteth()
|
Line 75 geteth()
|
mgmt() |
mgmt() |
{ |
{ |
[ -r /etc/mylan ] && VDEV=`cat /etc/mylan` |
[ -r /etc/mylan ] && VDEV=`cat /etc/mylan` |
VDEV=${VDEV:-`get1steth -g`} | if [ -x /usr/bin/get1steth ]; then |
| VDEV=${VDEV:-`get1steth -g`} |
|
|
|
get1steth -v $VDEV | tee -a $BOOTLOG 1>/dev/null 2>&1 |
|
else |
|
VDEV=${VDEV:-`geteth`} |
|
ifconfig vlan$MGMT_VLAN create vlan $MGMT_VLAN vlandev $VDEV |
|
ifconfig vlan$MGMT_VLAN name $MGMT_NAME |
|
ifconfig $MGMT_NAME inet $MGMT_ADDR |
|
fi |
|
|
echo "Configurete management interface to ($VDEV) ..." | tee -a $BOOTLOG |
echo "Configurete management interface to ($VDEV) ..." | tee -a $BOOTLOG |
get1steth -v $VDEV | tee -a $BOOTLOG 1>/dev/null 2>&1 |
|
} |
} |
|
|
syspkg() |
syspkg() |
Line 88 syspkg()
|
Line 96 syspkg()
|
|
|
echo "Mounting firmware system packages:" | tee -a $BOOTLOG |
echo "Mounting firmware system packages:" | tee -a $BOOTLOG |
# Raw images |
# Raw images |
for i in /elwix/cf/*-firmware; do | for i in /elwix/cf/*-pkg.fw; do |
if [ -r $i ]; then |
if [ -r $i ]; then |
MDDEV=$(mdconfig -a -t vnode -f $i); |
MDDEV=$(mdconfig -a -t vnode -f $i); |
install -d $SYSPKGDIR/$MDDEV; |
install -d $SYSPKGDIR/$MDDEV; |
Line 110 syspkg()
|
Line 118 syspkg()
|
fi |
fi |
done |
done |
# UZIP images |
# UZIP images |
for i in /elwix/cf/*-firmware-pkg; do | for i in /elwix/cf/*-pkg.fwz; do |
if [ -r $i ]; then |
if [ -r $i ]; then |
MDDEV=$(mdconfig -a -t vnode -f $i); |
MDDEV=$(mdconfig -a -t vnode -f $i); |
install -d $SYSPKGDIR/$MDDEV; |
install -d $SYSPKGDIR/$MDDEV; |