12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091 |
- <?xml version='1.0' encoding='iso-8859-1'?>
- <!doctype html public '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
- <html xmlns='http://www.w3c.org/1999/xhtml' lang='en-us'>
- <head>
- <title>
- start.sh
- </title>
- <meta http-equiv='content-type' content='text/html;iso-8859-1'/>
- <meta name='generator' content='motley-tools 1.9.4 13:40:33 Feb 18 2015'/>
- <meta name='author' content='cmaier@cmassoc.net'/>
- <meta name='robots' content='noindex,nofollow'/>
- <link href='toolkit.css' rel='stylesheet' type='text/css'/>
- </head>
- <body>
- <div class='headerlink'>
- [<a href='replace-softloader.sh.html' title=' replace-softloader.sh '>PREV</a>]
- [<a href='toolkit.html' title=' Index '>HOME</a>]
- [<a href='tr069prog.sh.html' title=' tr069prog.sh '>NEXT</a>]
- </div>
- <pre>
- #!/bin/sh
- # file: scripts/start.sh
- # use int6kf to start firmware on a device having a blank or corrupted
- # NVRAM; this is a standard Intellon script that has proven useful but
- # feel free to make changes;
- # ====================================================================
- # host symbols;
- # --------------------------------------------------------------------
- . /etc/enfironment
- . ${SCRIPTS}/hardware.sh
- . ${SCRIPTS}/firmware.sh
- # ====================================================================
- # query connection;
- # --------------------------------------------------------------------
- echo -n "Interface [${ETH}]: "; read
- if [ ! -z ${REPLY} ]; then
- ETH=${REPLY}
- fi
- # ====================================================================
- # define random DAK and NMK;
- # --------------------------------------------------------------------
- MAC=auto
- DAK=$(rkey secret.key -D)
- NMK=$(rkey secret.key -M)
- # ====================================================================
- # update PIB file with MAC, DAK and NMK;
- # --------------------------------------------------------------------
- modpib -M ${MAC} -D ${DAK} -N ${NMK} ${PIB} -v
- if [ ${?} != 0 ]; then
- exit 1
- fi
- # ====================================================================
- # write CFG, FW and PIB to device and start FW execution;
- # --------------------------------------------------------------------
- int6kf -i ${ETH} -C ${CFG} -P ${PIB} -N ${NVM}
- if [ ${?} != 0 ]; then
- exit 1
- fi
- # ====================================================================
- # confirm device identity;
- # --------------------------------------------------------------------
- int6k -i ${ETH} -I
- # ====================================================================
- #
- # --------------------------------------------------------------------
- exit 0
- </pre>
- <div class='footerlink'>
- [<a href='replace-softloader.sh.html' title=' replace-softloader.sh '>PREV</a>]
- [<a href='toolkit.html' title=' Index '>HOME</a>]
- [<a href='tr069prog.sh.html' title=' tr069prog.sh '>NEXT</a>]
- </div>
- </body>
- </html>
|