upgradep.sh.html 3.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120
  1. <?xml version='1.0' encoding='iso-8859-1'?>
  2. <!doctype html public '-//W3C//DTD XHTML 1.0 Strict//EN' 'http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd'>
  3. <html xmlns='http://www.w3c.org/1999/xhtml' lang='en-us'>
  4. <head>
  5. <title>
  6. upgradep.sh
  7. </title>
  8. <meta http-equiv='content-type' content='text/html;iso-8859-1'/>
  9. <meta name='generator' content='motley-tools 1.9.4 13:40:33 Feb 18 2015'/>
  10. <meta name='author' content='cmaier@cmassoc.net'/>
  11. <meta name='robots' content='noindex,nofollow'/>
  12. <link href='toolkit.css' rel='stylesheet' type='text/css'/>
  13. </head>
  14. <body>
  15. <div class='headerlink'>
  16. [<a href='traffic.sh.html' title=' traffic.sh '>PREV</a>]
  17. [<a href='toolkit.html' title=' Index '>HOME</a>]
  18. [<a href='upgrade.sh.html' title=' upgrade.sh '>NEXT</a>]
  19. </div>
  20. <pre>
  21. #!/bin/sh
  22. # file: scripts/upgradep.sh
  23. # ====================================================================
  24. # host symbols;
  25. # --------------------------------------------------------------------
  26. . ${SCRIPTS}/hardware.sh
  27. . ${SCRIPTS}/firmware.sh
  28. # ====================================================================
  29. # confirm connection;
  30. # --------------------------------------------------------------------
  31. echo -n &quot;Interface [${ETH}]: &quot;; read
  32. if [ ! -z ${REPLY} ]; then
  33. ETH=${REPLY}
  34. fi
  35. # ====================================================================
  36. # check connection;
  37. # --------------------------------------------------------------------
  38. int6kwait -xqsi ${ETH}
  39. if [ ${?} != 0 ]; then
  40. echo &quot;Device is not connected&quot;
  41. exit 1
  42. fi
  43. # ====================================================================
  44. # file symbols;
  45. # --------------------------------------------------------------------
  46. MAC=$(int6kid -Ai ${ETH})
  47. DAK=$(int6kid -Di ${ETH})
  48. NMK=$(int6kid -Mi ${ETH})
  49. # ====================================================================
  50. # confirm MAC;
  51. # --------------------------------------------------------------------
  52. echo -n &quot;MAC [${MAC}]: &quot;; read
  53. if [ ! -z ${REPLY} ]; then
  54. MAC=&quot;${REPLY}&quot;
  55. fi
  56. echo -n &quot;DAK [${DAK}]: &quot;; read
  57. if [ ! -z ${REPLY} ]; then
  58. DAK=&quot;${REPLY}&quot;
  59. fi
  60. echo -n &quot;NMK [${NMK}]: &quot;; read
  61. if [ ! -z ${REPLY} ]; then
  62. NMK=&quot;${REPLY}&quot;
  63. fi
  64. # ====================================================================
  65. #
  66. # --------------------------------------------------------------------
  67. modpib -M ${MAC} -D ${DAK} -N ${NMK} ${PIB}
  68. if [ ${?} != 0 ]; then
  69. exit 1
  70. fi
  71. # ====================================================================
  72. #
  73. # --------------------------------------------------------------------
  74. # flash PIB only
  75. # int6kp -i ${ETH} -P ${PIB} -D ${DAK} -C2
  76. # flash FW and PIB
  77. int6kp -i ${ETH} -P ${PIB} -N ${NVM} -D ${DAK} -F
  78. if [ ${?} != 0 ]; then
  79. exit 1
  80. fi
  81. # ====================================================================
  82. #
  83. # --------------------------------------------------------------------
  84. int6k -i ${ETH} -I
  85. # ====================================================================
  86. #
  87. # --------------------------------------------------------------------
  88. exit 0
  89. </pre>
  90. <div class='footerlink'>
  91. [<a href='traffic.sh.html' title=' traffic.sh '>PREV</a>]
  92. [<a href='toolkit.html' title=' Index '>HOME</a>]
  93. [<a href='upgrade.sh.html' title=' upgrade.sh '>NEXT</a>]
  94. </div>
  95. </body>
  96. </html>