|
version 1.1.2.2, 2014/01/23 10:18:53
|
version 1.2.4.1, 2018/01/01 22:34:33
|
|
Line 18 EDITOR=vi
|
Line 18 EDITOR=vi
|
| PAGER=less |
PAGER=less |
| export HOME PATH TERM BLOCKSIZE EDITOR PAGER |
export HOME PATH TERM BLOCKSIZE EDITOR PAGER |
| |
|
| |
CFDIR="/elwix/cf" |
| SYSPKGDIR="/var/frm" |
SYSPKGDIR="/var/frm" |
| BOOTLOG="/var/run/elwix.boot" |
BOOTLOG="/var/run/elwix.boot" |
| |
|
|
Line 36 boot()
|
Line 37 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 48 options()
|
Line 56 options()
|
| passwd() |
passwd() |
| { |
{ |
| echo "Syncing password database ..." | tee -a $BOOTLOG |
echo "Syncing password database ..." | tee -a $BOOTLOG |
| pwd_mkdb /etc/master.passwd | tee -a $BOOTLOG 1>/dev/null 2>&1 | # pwd_mkdb /etc/master.passwd | tee -a $BOOTLOG 1>/dev/null 2>&1 |
| rm -f /etc/nologin |
rm -f /etc/nologin |
| } |
} |
| |
|
|
Line 70 geteth()
|
Line 78 geteth()
|
| mgmt() |
mgmt() |
| { |
{ |
| [ -r /etc/mylan ] && VDEV=`cat /etc/mylan` |
[ -r /etc/mylan ] && VDEV=`cat /etc/mylan` |
| if [ -x /usr/bin/get1steth ]; then | if [ -x /usr/local/bin/get1steth ]; then |
| VDEV=${VDEV:-`get1steth -g`} |
VDEV=${VDEV:-`get1steth -g`} |
| |
|
| get1steth -v $VDEV | tee -a $BOOTLOG 1>/dev/null 2>&1 |
get1steth -v $VDEV | tee -a $BOOTLOG 1>/dev/null 2>&1 |
|
Line 92 syspkg()
|
Line 100 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/*-pkg.frm; do | for i in ${CFDIR}/*-pkg.frm; 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 114 syspkg()
|
Line 122 syspkg()
|
| fi |
fi |
| done |
done |
| # UZIP images |
# UZIP images |
| for i in /elwix/cf/*-pkg.frz; do | for i in ${CFDIR}/*-pkg.frz; 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 141 service()
|
Line 149 service()
|
| { |
{ |
| echo "Starting distribution static services:" | tee -a $BOOTLOG |
echo "Starting distribution static services:" | tee -a $BOOTLOG |
| for i in /etc/rc.d/*.run; do |
for i in /etc/rc.d/*.run; do |
| if [ -x $i ]; then | if [ -x "$i" ]; then |
| $i |
$i |
| fi |
fi |
| done |
done |
|
Line 151 service()
|
Line 159 service()
|
| |
|
| echo "Starting distribution services:" | tee -a $BOOTLOG |
echo "Starting distribution services:" | tee -a $BOOTLOG |
| for i in /etc/rc.S/*.run; do |
for i in /etc/rc.S/*.run; do |
| if [ -x $i ]; then | if [ -x "$i" ]; then |
| $i |
$i |
| fi |
fi |
| done |
done |
|
Line 163 service()
|
Line 171 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 |