version 1.3, 2013/08/05 13:10:17
|
version 1.5, 2014/09/15 19:06:44
|
Line 20 export HOME PATH TERM BLOCKSIZE EDITOR PAGER
|
Line 20 export HOME PATH TERM BLOCKSIZE EDITOR PAGER
|
|
|
SYSPKGDIR="/var/frm" |
SYSPKGDIR="/var/frm" |
BOOTLOG="/var/run/elwix.boot" |
BOOTLOG="/var/run/elwix.boot" |
XML="/etc/config.xml" |
|
|
|
MGMT_VLAN="4093" |
MGMT_VLAN="4093" |
MGMT_NAME="mgmt" |
MGMT_NAME="mgmt" |
Line 37 boot()
|
Line 36 boot()
|
cd /elwix/altroot |
cd /elwix/altroot |
pax -rw -pe var / |
pax -rw -pe var / |
chmod 1777 /var/tmp |
chmod 1777 /var/tmp |
|
mount /elwix/etc |
cd / |
cd / |
} |
} |
|
|
|
restore_uboot() |
|
{ |
|
echo "Load configz from NAND ..." |
|
/etc/rc.cfg load /etc |
|
} |
|
|
options() |
options() |
{ |
{ |
echo "Set firmware options ..." | tee -a $BOOTLOG |
echo "Set firmware options ..." | tee -a $BOOTLOG |
Line 58 local()
|
Line 64 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` |
if [ -x /usr/bin/xmler ]; then |
|
hostname `xmler -g /elwix/system/hostname $XML` |
|
domainname `xmler -g /elwix/system/domain $XML` |
|
fi |
|
} |
} |
|
|
geteth() |
geteth() |
Line 81 mgmt()
|
Line 83 mgmt()
|
get1steth -v $VDEV | tee -a $BOOTLOG 1>/dev/null 2>&1 |
get1steth -v $VDEV | tee -a $BOOTLOG 1>/dev/null 2>&1 |
else |
else |
VDEV=${VDEV:-`geteth`} |
VDEV=${VDEV:-`geteth`} |
|
ifconfig $VDEV up |
ifconfig vlan$MGMT_VLAN create vlan $MGMT_VLAN vlandev $VDEV |
ifconfig vlan$MGMT_VLAN create vlan $MGMT_VLAN vlandev $VDEV |
ifconfig vlan$MGMT_VLAN name $MGMT_NAME |
ifconfig vlan$MGMT_VLAN name $MGMT_NAME |
ifconfig $MGMT_NAME inet $MGMT_ADDR |
ifconfig $MGMT_NAME inet $MGMT_ADDR |
Line 167 service()
|
Line 170 service()
|
# |
# |
|
|
boot |
boot |
|
restore_uboot |
echo "elwix>>> Start system boot stage at `date`" | tee $BOOTLOG |
echo "elwix>>> Start system boot stage at `date`" | tee $BOOTLOG |
options |
options |
passwd |
passwd |