|
|
| version 1.6.2.3, 2017/06/19 13:14:03 | version 1.7, 2021/03/11 13:59:50 |
|---|---|
| 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 30 umask 022 | Line 31 umask 022 |
| boot() | boot() |
| { | { |
| echo "Loading ELWIX configz ..." | echo "Loading ELWIX configz ..." |
| cd /elwix/altroot | cd /elwix/altroot |
| pax -rw -pe var / | pax -rw -pe var / |
| chmod 1777 /var/tmp | chmod 1777 /var/tmp |
| # mount -tunionfs -onoatime /var/db/etc /elwix/etc | |
| mount -ttmpfs tmpfs /var/db/pkg | mount -ttmpfs tmpfs /var/db/pkg |
| cd / | cd / |
| } | } |
| Line 41 boot() | Line 42 boot() |
| restore_uboot() | restore_uboot() |
| { | { |
| echo "Restore configz from NAND ..." | echo "Restore configz from NAND ..." |
| cfexec /etc/rc.cfg load /etc | /etc/rc.cfg load /etc |
| } | } |
| options() | options() |
| Line 53 options() | Line 54 options() |
| passwd() | passwd() |
| { | { |
| echo "Syncing password database ..." | tee -a $BOOTLOG | echo "Syncing password database ..." | tee -a $BOOTLOG |
| cfexec 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 |
| } | } |
| local() | 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 inet 127.0.0.1 netmask 255.0.0.0 | tee -a $BOOTLOG 1>/dev/null 2>&1 |
| hostname `cat /etc/myname` | hostname `cat /etc/myname` |
| } | } |
| Line 97 syspkg() | Line 98 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 119 syspkg() | Line 120 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 146 service() | Line 147 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 156 service() | Line 157 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 |